Object status
by George Balla · in Torque Game Builder · 08/21/2006 (2:41 pm) · 1 replies
I have a ball that has physics attributes added to it. The ball bounces around the screen until it stops.
How do I know when there is no more movement on that ball?
Is there an event that triggers when it stops?
How do I know when there is no more movement on that ball?
Is there an event that triggers when it stops?
About the author
Associate David Higgins
DPHCoders.com
$MIN_MOVE = 1.0; $MIN_ROTE = 1.0; $obj.setLinearVelocityPolar(45, 45); $obj.setTimerOn(100); function obj::onTimer(%this) { %angspd = $obj.getLinearVelocityPolar(); if(getWord(%angspd, 0) < $MIN_ROTE && getWord(%angspd,1) < $MIN_MOVE) { $obj.setAtRest(); $obj.isAtRest(); // my 'callback' } }for example