Playmaker Forum
PlayMaker Help & Tips => PlayMaker Help => Topic started by: wallaceb68 on October 29, 2013, 10:44:04 AM
-
I am trying to figure out how to check if a car has came to a stop. and if so do this***** if not do *******
-
How do you move the car ?
If you use iTween you can fire an event on finish.
If you use unity pathfinding you can use GetRemainingDistance and then also fire an event when arrived
You can check the distance between the car and the stop, if you know their location, with a Get Distance action.
Maybe you can check the velocity of the car ?
Or you can check if its position changed over time ?
......
....
..
Depends on your setup
-
If you have a rigid body you might want to get the property RidgidBody->Velocity->Magnitude. That should be greater than zero with movement in any axis or 0 if stopped. Then you could do a float compare or set a bool and use the bool state to perform logic.