mirror of
https://foundry.openuru.org/gitblit/r/CWE-ou-minkata.git
synced 2025-07-17 18:59:09 +00:00
Convert the impact velocity to avatar-local coordinates, because that's what {Running|Ground}Impact::PreCondition() expects.
Fixes landing animations depending on what direction relative to the age you jump rather than whether you land forward or straight down.
This commit is contained in:
@ -137,6 +137,8 @@ void plWalkingController::RecalcVelocity(double timeNow, double timePrev, hsBool
|
|||||||
// always (0,0,0) outside of the controller update proc
|
// always (0,0,0) outside of the controller update proc
|
||||||
fImpactTime = fWalkingStrategy->GetAirTime();
|
fImpactTime = fWalkingStrategy->GetAirTime();
|
||||||
fImpactVelocity = fController->GetAchievedLinearVelocity();
|
fImpactVelocity = fController->GetAchievedLinearVelocity();
|
||||||
|
// convert orientation from subworld to avatar-local coordinates
|
||||||
|
fImpactVelocity = (hsVector3)fController->GetLocalRotation().Rotate(&fImpactVelocity);
|
||||||
fClearImpact = false;
|
fClearImpact = false;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
|
@ -147,6 +147,7 @@ public:
|
|||||||
virtual void CheckAndHandleAnyStateChanges();
|
virtual void CheckAndHandleAnyStateChanges();
|
||||||
virtual void UpdateSubstepNonPhysical();
|
virtual void UpdateSubstepNonPhysical();
|
||||||
virtual const hsPoint3& GetLocalPosition()=0;
|
virtual const hsPoint3& GetLocalPosition()=0;
|
||||||
|
const hsQuat& GetLocalRotation() { return fLocalRotation; }
|
||||||
virtual void MoveActorToSim();
|
virtual void MoveActorToSim();
|
||||||
|
|
||||||
virtual void OverrideAchievedVelocity(hsVector3 newAchievedVel)
|
virtual void OverrideAchievedVelocity(hsVector3 newAchievedVel)
|
||||||
|
Reference in New Issue
Block a user