79533540

Date: 2025-03-25 11:42:05
Score: 1
Natty:
Report link

I have a feeling, that division is not appropriate there. After all, "Time.fixedDeltaTime" is "Fixed Timestep" (located in Project Settings -> Time). And if you change this parameter ("Fixed Timestep"), then "Time.fixedDeltaTime" will also change. So under the same conditions, but with different values ​​of the "Fixed Timestep" parameter, there will be a different force value.

Conclusion: You can simply use "Vector3 collisionForce = col.impulse" which will be much more accurate. The value of "collisionForce" may change slightly when changing "Fixed Timestep", but not significantly than if using "division".

And, I generally do not recommend using "Time.fixedDeltaTime" in "FixedUpdate ()", because it results in a double action multiplication/division.

Reasons:
  • Long answer (-0.5):
  • No code block (0.5):
  • Low reputation (1):
Posted by: Сергій Ворошилов