diff options
author | Benoit Bolsee <benoit.bolsee@online.be> | 2008-07-21 01:09:56 +0400 |
---|---|---|
committer | Benoit Bolsee <benoit.bolsee@online.be> | 2008-07-21 01:09:56 +0400 |
commit | 9f5399918176c73fc366c0982738128c71615a77 (patch) | |
tree | 4fc19c1bb4959c111ddb4d4fb0db48d6122ee121 /source/gameengine | |
parent | e0fc591697b5948aed097e7527b8adce4e280abb (diff) |
BGE patch: constraint orientation actuator did not work when damping=0.
Diffstat (limited to 'source/gameengine')
-rw-r--r-- | source/gameengine/Ketsji/KX_ConstraintActuator.cpp | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/source/gameengine/Ketsji/KX_ConstraintActuator.cpp b/source/gameengine/Ketsji/KX_ConstraintActuator.cpp index 80288a72485..e0b2efb3a25 100644 --- a/source/gameengine/Ketsji/KX_ConstraintActuator.cpp +++ b/source/gameengine/Ketsji/KX_ConstraintActuator.cpp @@ -178,16 +178,18 @@ bool KX_ConstraintActuator::Update(double curtime, bool frame) direction[2] = rotation[2][1]; axis = 1; break; - case KX_ACT_CONSTRAINT_ORIZ: + default: direction[0] = rotation[0][2]; direction[1] = rotation[1][2]; direction[2] = rotation[2][2]; axis = 2; break; } - // apply damping on the direction if (m_posDampTime) { + // apply damping on the direction direction = filter*direction + (1.0-filter)*m_refDirection; + } else { + direction = m_refDirection; } obj->AlignAxisToVect(direction, axis); result = true; |