[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [15660] trunk/blender/source/gameengine/ Ketsji/KX_ConstraintActuator.cpp: BGE patch: constraint orientation actuator did not work when damping=0.

Benoit Bolsee benoit.bolsee at online.be
Sun Jul 20 23:09:58 CEST 2008


Revision: 15660
          http://projects.blender.org/plugins/scmsvn/viewcvs.php?view=rev&root=bf-blender&revision=15660
Author:   ben2610
Date:     2008-07-20 23:09:56 +0200 (Sun, 20 Jul 2008)

Log Message:
-----------
BGE patch: constraint orientation actuator did not work when damping=0.

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-07-20 21:05:48 UTC (rev 15659)
+++ trunk/blender/source/gameengine/Ketsji/KX_ConstraintActuator.cpp	2008-07-20 21:09:56 UTC (rev 15660)
@@ -178,16 +178,18 @@
 				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;





More information about the Bf-blender-cvs mailing list