I’m always setting rigidbody forces and velocities in the fixedUpdate function.
What I want to know is when all the physics calculations is called? I mean, is it called right after the fixedupdate function?
I’m always setting rigidbody forces and velocities in the fixedUpdate function.
What I want to know is when all the physics calculations is called? I mean, is it called right after the fixedupdate function?
This thread should help you: http://forum.unity3d.com/threads/2606-Docs-on-calling-order-in-MonoBehaviour
EDIT: there is a more detailed answer below with code.
Thanks it does help. But I still cant solve my problem. I have a player with rigidbody and I apply forces on it and then I have a camera script that set the camera position to the player position (2D platformer). but the player always stutter when the camera moves. I tried almost everything, changing interpolation, changing fixedupdate/update/lateupdate But always eitehr the background stutter or the player stutter. do you have any solution?
– ziv03I think this problem can be solved if I'll have the function that updates the rigidbody position. then I can call right after updating player position to the trackPlayer function. BTW, if you open the 2d platformer example that unity made, it has the same problem
– ziv03Do you have several rigid bodies in your scene? What are your stats telling you? Can you take a picture of the stats and post it in your question?
– bompi88
Have you read [this][1] post? [1]: http://answers.unity3d.com/questions/10993/whats-the-difference-between-update-and-fixedupdat.html
– bompi88