[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [16599] trunk/blender/source/gameengine/ Ketsji/KX_ConstraintActuator.cpp: BGE patch: change constraint location actuator to work in local coordinates.
Benoit Bolsee
benoit.bolsee at online.be
Thu Sep 18 21:28:28 CEST 2008
Revision: 16599
http://projects.blender.org/plugins/scmsvn/viewcvs.php?view=rev&root=bf-blender&revision=16599
Author: ben2610
Date: 2008-09-18 21:28:28 +0200 (Thu, 18 Sep 2008)
Log Message:
-----------
BGE patch: change constraint location actuator to work in local coordinates. It won't change anything for root objects but will be of some use for child objects.
Modified Paths:
--------------
trunk/blender/source/gameengine/Ketsji/KX_ConstraintActuator.cpp
Modified: trunk/blender/source/gameengine/Ketsji/KX_ConstraintActuator.cpp
===================================================================
--- trunk/blender/source/gameengine/Ketsji/KX_ConstraintActuator.cpp 2008-09-18 17:42:17 UTC (rev 16598)
+++ trunk/blender/source/gameengine/Ketsji/KX_ConstraintActuator.cpp 2008-09-18 19:28:28 UTC (rev 16599)
@@ -359,7 +359,7 @@
case KX_ACT_CONSTRAINT_LOCX:
case KX_ACT_CONSTRAINT_LOCY:
case KX_ACT_CONSTRAINT_LOCZ:
- newposition = position;
+ newposition = position = obj->GetSGNode()->GetLocalPosition();
switch (m_locrot) {
case KX_ACT_CONSTRAINT_LOCX:
Clamp(newposition[0], m_minimumBound, m_maximumBound);
@@ -375,7 +375,8 @@
if (m_posDampTime) {
newposition = filter*position + (1.0-filter)*newposition;
}
- break;
+ obj->NodeSetLocalPosition(newposition);
+ goto CHECK_TIME;
}
if (result) {
// set the new position but take into account parent if any
More information about the Bf-blender-cvs
mailing list