Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBenoit Bolsee <benoit.bolsee@online.be>2008-09-18 01:47:05 +0400
committerBenoit Bolsee <benoit.bolsee@online.be>2008-09-18 01:47:05 +0400
commit067a890d823bb0181b1d028931004eba86fb9220 (patch)
tree13a8cfd1e1909f693a540cb544340b0b654e009f /source/gameengine/Ketsji
parent0c1ec934c61ae65585bc8d317276da8484dddabc (diff)
BGE bug #17578: repair linV actuator in Add+Local mode.
Diffstat (limited to 'source/gameengine/Ketsji')
-rw-r--r--source/gameengine/Ketsji/KX_GameObject.cpp7
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);
+ }
}