diff options
author | Benoit Bolsee <benoit.bolsee@online.be> | 2008-07-23 03:05:06 +0400 |
---|---|---|
committer | Benoit Bolsee <benoit.bolsee@online.be> | 2008-07-23 03:05:06 +0400 |
commit | a18c723d5514d3ee74b3d770f8e025091eee47c7 (patch) | |
tree | ed9db943c25fea8fcf2b2a34c814f351d1f22688 /source/gameengine/Ketsji/KX_ConstraintActuator.h | |
parent | 21bf5167ed3531b8d4f7766f1ccb41be5224480f (diff) |
BGE patch: Add min/max parameters to orientation constraint actuator
The min/max parameters define a minimum/maximum angle
that the object axis can have with the reference
direction without being constrainted. The angle is
expressed in degree and is limited to 0-180 range.
The min/max parameters define a conical free zone
around the reference direction.
If the object axis is outside that free zone, the
actuator will tend to put it back using as a temporary
reference direction the vector that is exactly at
min or max degree of the reference direction
(depending if the axis angle is below the minimum
or above the maximum) and is located in the plane
formed by the axis and the reference direction.
With a low damping value, this is equivalent to
clamping the axis orientation within min/max degree
of the reference direction.
Backward compatibility corresponds to the absence
of free zone: min = max = 0.
Diffstat (limited to 'source/gameengine/Ketsji/KX_ConstraintActuator.h')
-rw-r--r-- | source/gameengine/Ketsji/KX_ConstraintActuator.h | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/source/gameengine/Ketsji/KX_ConstraintActuator.h b/source/gameengine/Ketsji/KX_ConstraintActuator.h index 5a1d4d23217..3ef51595098 100644 --- a/source/gameengine/Ketsji/KX_ConstraintActuator.h +++ b/source/gameengine/Ketsji/KX_ConstraintActuator.h @@ -48,6 +48,10 @@ protected: float m_minimumBound; // max (float) float m_maximumBound; + // sinus of minimum angle + float m_minimumSine; + // sinus of maximum angle + float m_maximumSine; // reference direction MT_Vector3 m_refDirection; // locrotxyz choice (pick one): only one choice allowed at a time! |