|
Is there a prebuilt function that checks if an object is in motion? A function that checks x,y,z tranform to tell if the object is in motion or at rest? If not, any ideas on how to acomplish this task? Thanks Doodle
(comments are locked)
|
|
If you have a rigidbody, then you can do If you are using a Character Controller, then checking to see if Or, you can manually save a Vector3 every frame that remembers the last position. Something like: Thanks Peter! I will test out the Rigidbody.IsSleeping() function to see if it will work... Thanks again!!!! Doodle
Sep 11 '10 at 12:49 AM
Doodle
Is there a way to check all gameobjects in the scene to see if they are moving ?
Jan 12 '11 at 03:41 PM
Mark 6
Yes, just iterate through all the objects in your scene i.e. sceneObjects = FindObjectsOfType(GameObject); for(var gB : GameObject in sceneObjects) { //use above info }
Jan 12 '11 at 11:02 PM
Peter G
(comments are locked)
|
