diff options
author | Benoit Bolsee <benoit.bolsee@online.be> | 2008-09-18 01:47:05 +0400 |
---|---|---|
committer | Benoit Bolsee <benoit.bolsee@online.be> | 2008-09-18 01:47:05 +0400 |
commit | 067a890d823bb0181b1d028931004eba86fb9220 (patch) | |
tree | 13a8cfd1e1909f693a540cb544340b0b654e009f /source/gameengine | |
parent | 0c1ec934c61ae65585bc8d317276da8484dddabc (diff) |
BGE bug #17578: repair linV actuator in Add+Local mode.
Diffstat (limited to 'source/gameengine')
-rw-r--r-- | source/gameengine/Ketsji/KX_GameObject.cpp | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/source/gameengine/Ketsji/KX_GameObject.cpp b/source/gameengine/Ketsji/KX_GameObject.cpp index 0e5956d4fdb..252741754ec 100644 --- a/source/gameengine/Ketsji/KX_GameObject.cpp +++ b/source/gameengine/Ketsji/KX_GameObject.cpp @@ -590,8 +590,11 @@ KX_GameObject::GetLayer( void KX_GameObject::addLinearVelocity(const MT_Vector3& lin_vel,bool local) { - if (m_pPhysicsController1) - m_pPhysicsController1->SetLinearVelocity(lin_vel + m_pPhysicsController1->GetLinearVelocity(),local); + if (m_pPhysicsController1) + { + MT_Vector3 lv = local ? NodeGetWorldOrientation() * lin_vel : lin_vel; + m_pPhysicsController1->SetLinearVelocity(lv + m_pPhysicsController1->GetLinearVelocity(), 0); + } } |