- Home /
How good is to put Move.Towards on Fixed Update?
I have a Move.Towards in the update function for some objects cause they dont have a Rigidbody. I also have a trigger event somewhere in the game, but the detection is not as fast cause the Triggers are checked on FixedUpdate. So I decided to put the Move.Towards on the FixedUpdate so they are more on sync. Is this good practice, to put a Move.Towards on Fixed Update without a Rigidbody? Also, what is more optimal: to use the rigidbody movement functions or move.towards??
Thanks
Are you talking about Vector3.$$anonymous$$oveTowards? This doesn't have anything to do with physics btw. It just applies a clamped influence in a given direction.
From the documentation on Rigidbody.$$anonymous$$ovePosition: When Rigidbody interpolation is enabled, Rigidbody.$$anonymous$$ovePosition creates a smooth transition between frames.
Not an answer as I think there's some confusion about which of these, so just providing info.
Your answer
Follow this Question
Related Questions
How do i add velocity in direction depending on WASD keys pressed 1 Answer
How to make rigidbody.AddForce and controller.Move work together? 0 Answers
Rigidbody wont stop moving!!!! AGH!! 2 Answers
rigidbody.AddForce(transform.forward * 5000) 1 Answer
How to make an object without Rigidbody move at the same speed as an object with Rigidbody? 1 Answer