Hello,
I’m trying to find a solution to check if the player is moving. The player is moved by a character controller. Does someone know how I can check this?
Hello,
I’m trying to find a solution to check if the player is moving. The player is moved by a character controller. Does someone know how I can check this?
What AlwaysSunny is suggesting (js):
private var lastPosition = (0,0,0);
function Update ()
{
if (lastPosition != gameObject.trasform.position)
{
//-- Do whatever it is you need to do when the object is moving.
}
lastPosition = gameObject.trasform.position
}