Shouldn’t we be using Time.fixedDeltaTime in FixedUpdate? Otherwise this will become frame rate dependent since it’s only being triggered in the fixed update time interval but it is being multiplied by the frame rate length.
Yes, you are correct. In Unity, it’s recommended to use Time.fixedDeltaTime instead of Time.deltaTime when working with physics calculations or other actions that should be done in FixedUpdate().
The reason for this is that Time.fixedDeltaTime ensures that the time step used for physics calculations is consistent, regardless of the frame rate. Using Time.deltaTime in FixedUpdate() can lead to physics simulations being affected by the frame rate and can result in unexpected behavior.
So, if you need to perform physics calculations or other actions in FixedUpdate(), it’s best to use Time.fixedDeltaTime to ensure that your simulation is consistent and predictable across different hardware configurations and frame rates.
Sorry, this is the best I’ve got, hope it helps a bit!
It should definitely be Time.fixedDeltaTime. Time.deltaTime could be substantially different from fixedDeltaTime.
This topic was automatically closed 24 hours after the last reply. New replies are no longer allowed.