diff options
author | Mitchell Stokes <mogurijin@gmail.com> | 2012-11-01 07:11:39 +0400 |
---|---|---|
committer | Mitchell Stokes <mogurijin@gmail.com> | 2012-11-01 07:11:39 +0400 |
commit | b6596467d909e9b77233182355f7fdee1d98dbf2 (patch) | |
tree | 7c0f14bef1dc334a94a3468ccc0cbd2a130565c7 /source/gameengine/Ketsji | |
parent | 1bcadda46b96e3e557aad1b0d2d53a0b4743b413 (diff) |
BGE: Fix for bug #33025 "Character physics object won't stop moving with simple motion actuator" reported by Jared Smith (jsmithketchup). Characters no longer use a simple translation change for ApplyMovement(), they instead delegate to the character controller's setWalkDirection(). The motion actuator now sets this to (0, 0, 0) on a negative pulse.
Diffstat (limited to 'source/gameengine/Ketsji')
-rw-r--r-- | source/gameengine/Ketsji/KX_ObjectActuator.cpp | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/source/gameengine/Ketsji/KX_ObjectActuator.cpp b/source/gameengine/Ketsji/KX_ObjectActuator.cpp index 9cebf9cfc82..2999550fb8f 100644 --- a/source/gameengine/Ketsji/KX_ObjectActuator.cpp +++ b/source/gameengine/Ketsji/KX_ObjectActuator.cpp @@ -114,7 +114,14 @@ bool KX_ObjectActuator::Update() (m_bitLocalFlag.AngularVelocity) != 0 ); m_active_combined_velocity = false; - } + } + + // Explicitly stop the movement if we're using a character (apply movement is a little different for characters) + if (parent->GetPhysicsController()->IsCharacter()) { + MT_Vector3 vec(0.0, 0.0, 0.0); + parent->ApplyMovement(vec, true); + } + m_linear_damping_active = false; m_angular_damping_active = false; m_error_accumulator.setValue(0.0,0.0,0.0); |