body class functions

Recommended Posts



Are these functions related to node transform?




Or shape?





I'm simply trying to switch walking and idle animation when a human object moves and stop.

Is the body class the only way to capture the movement of an object?


Edited by dongju.jeong
Link to post


When the setTransform(), setPreserveTransform() and setVelocityTransform() methods are used, the node transformation is affected. This doesn't change the transforms of shapes, as they are stored in local transforms relative to the body. The position change callback is called when body, node, and shape transformations change. Instead of a callback, you can try comparing the position of the node in the previous and current frames:

if (MathLib.Compare(node.WorldPosition, node.OldWorldPosition) == 0)
	// position changed


  • Like 1
Link to post

thank you.

Currently, we are working on a simple comparison of object locations.

Link to post