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:
Diffstat (limited to 'source/gameengine/Ketsji/KX_ConstraintActuator.cpp')
-rw-r--r--source/gameengine/Ketsji/KX_ConstraintActuator.cpp6
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;