Detect when a rigid body stopped rotating

Software: Away3D 4.x

sk, Newbie
Posted: 11 April 2013 01:23 PM   Total Posts: 8

I’m trying to roll a dice (cube) using a rigid body and I would like to detect when the rolling stopped?

How can I detect that the dice is lying still?

Thanks

   

John Brookes, Moderator
Posted: 13 April 2013 08:54 PM   Total Posts: 732   [ # 1 ]

if (!diceRb.isActive)
//then its not moving

This might take a sec from when it visibly stops to when it falls asleep.

You can also check its linear and angular velocity. If its below some value its not gonna roll to the next face.

   
   

X

Away3D Forum

Member Login

Username

Password

Remember_me



X