Question by
tallesmaziero · Oct 09, 2018 at 07:13 PM ·
fpsfixedupdateupdate functionupdate problem
The same code works on Update function but not on FixedUpdate, why?
I have this simple code:
if (!dangerMode && (Mathf.Abs(distance.x) >= dangerModeRadius) || (Mathf.Abs(distance.z) >= dangerModeRadius))
{
transform.position = Vector3.MoveTowards(transform.position, targetPlayer.transform.position, speed * Time.deltaTime);
}
It works in Update but not on FixedUpdate, also not inside a function called in the update method too.
What's wrong?
Comment
Your answer
Follow this Question
Related Questions
fixed update is not being called 1 Answer
Swipe Gesture combined with Physics -- Update or FixedUpdate ? 1 Answer
We just updated to 5.6.0f3 and none of our machines cannot load the unityengine.ui 0 Answers
Loads of errors after upgrading to 2018.3.0f 0 Answers
Problemas con Input.GetKeyDown() 0 Answers