- Home /
Applying Forces, independent of Frame Rate?
I'm having problems creating frame rate independent controls for my character, in this case a boat.
I am getting the in put in the Update() and then applying forces to the rigid body in the FixedUpdate.
I'm not sure to ether use Time.DeltaTime or Time.FixedDelta time?
What is the correct way to make the forces applied to the rigid body completely frame rate independent?
Answer by kevork · Feb 03, 2012 at 06:35 PM
For framerate independence you want to use Time.deltaTime in Update() and Time.fixedDeltaTime in FixedUpdate(). It is recommended that you perform Physics operations in FixedUpdate().
I currently calulate a forward force and turning force based on how long a key is pressed in Update(). I also also reduce these values over time inside Update().
Should these values be multiyed by the deltaTime inside the Update() or by FixedDeltaTime inside FixedUpdate. Before they are applyed to the rigid Body inside FixedUpdate()?