[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [51799] trunk/blender/source/gameengine/ Ketsji/KX_ObjectActuator.cpp: BGE: Fix for bug #33025 " Character physics object won't stop moving with simple motion actuator" reported by Jared Smith (jsmithketchup).

Mitchell Stokes mogurijin at gmail.com
Thu Nov 1 04:11:43 CET 2012


Revision: 51799
          http://projects.blender.org/scm/viewvc.php?view=rev&root=bf-blender&revision=51799
Author:   moguri
Date:     2012-11-01 03:11:39 +0000 (Thu, 01 Nov 2012)
Log Message:
-----------
BGE: Fix for bug #33025 "Character physics object won't stop moving with simple motion actuator" reported by Jared Smith (jsmithketchup). Characters no longer use a simple translation change for ApplyMovement(), they instead delegate to the character controller's setWalkDirection(). The motion actuator now sets this to (0, 0, 0) on a negative pulse.

Modified Paths:
--------------
    trunk/blender/source/gameengine/Ketsji/KX_ObjectActuator.cpp

Modified: trunk/blender/source/gameengine/Ketsji/KX_ObjectActuator.cpp
===================================================================
--- trunk/blender/source/gameengine/Ketsji/KX_ObjectActuator.cpp	2012-10-31 20:29:32 UTC (rev 51798)
+++ trunk/blender/source/gameengine/Ketsji/KX_ObjectActuator.cpp	2012-11-01 03:11:39 UTC (rev 51799)
@@ -114,7 +114,14 @@
 						(m_bitLocalFlag.AngularVelocity) != 0
 					);
 			m_active_combined_velocity = false;
-		} 
+		}
+
+		// Explicitly stop the movement if we're using a character (apply movement is a little different for characters)
+		if (parent->GetPhysicsController()->IsCharacter()) {
+			MT_Vector3 vec(0.0, 0.0, 0.0);
+			parent->ApplyMovement(vec, true);
+		}
+
 		m_linear_damping_active = false;
 		m_angular_damping_active = false;
 		m_error_accumulator.setValue(0.0,0.0,0.0);




More information about the Bf-blender-cvs mailing list