Playmaker Forum
PlayMaker Help & Tips => PlayMaker Help => Topic started by: devis.rossini on July 31, 2015, 10:29:14 AM
-
Hi,
In my FSM I have to compute every frame the distance between a rigidbody's position and a given target.
If this distance is equal or greater to the distance of the previous frame, I must trigger an event.
How can I do that? I must wait to the physics update in order to re-compute distance and comprare it with the old one.
Devis
-
Hi,
if you get the distance in a float you can use a float compare
-
Yes, but the position is not updated every ::Update(). I should check it during ::FixedUpdate()...
-
Hi,
there is a custom action on the Ecosystem (https://hutonggames.fogbugz.com/default.asp?W1181) called "RigidbodyTranslatePosition" that seems to work with FixedUpdate.