Is there a way to check for player movement/rotation?
by Nicolai Dutka · in Torque Game Engine Advanced · 09/08/2009 (5:22 pm) · 3 replies
I am just wondering if there is a way I can check to see if the player is moving or rotating their camera yaw and do something based on the result?
For example:
if($player.isMoving())
echo("Moving!");
else
echo("Stopped moving!");
if($player.isRotating())
echo("Rotating!");
else
echo("Stopped rotating!");
For example:
if($player.isMoving())
echo("Moving!");
else
echo("Stopped moving!");
if($player.isRotating())
echo("Rotating!");
else
echo("Stopped rotating!");
#2
09/08/2009 (5:59 pm)
Will this work with rotations as well? For example, the player is standing perfectly still, but rotating view with the mouse...
#3
09/08/2009 (10:31 pm)
Nope. You'll need to add a console method for that. The Player class's delta struct should help you with finding out how the character is rotating.
Torque Owner Ivan Mandzhukov
Liman3D
Additional checks can be led out to TS easily if you understand the console reference.