Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Help  Timescale changes cause rope to jump around
#3
(26-09-2020, 02:53 PM)josemendez Wrote: Yes, this is somewhat expected behavior: if you reduce the timestep, rope physics will suddenly be much snappier.

The timestep change itself doesn't seem to cause the weird behaviour, only the adjusting Time.fixedDeltaTime. It's not super clear from Unity docs but I think writing a value to fixedDeltaTime doesn't change the actual timestep, but rather changes the length it reports for that physics step, and they're recommending it be changed at the same time as adjusting the timestep so that it reports the correct physics step time to other scripts if they query it on the same frame that the actual timestep was changed, right?

My concern with omitting the adjustment to fixedDeltaTime is that I have many other things in my game that rely on this value to be accurate. But to be honest I don't totally understand what might happen if it is adjusted vs not. FixedDeltaTime is supposed to report a value that is *relative* to Time.timescale (per: https://docs.unity3d.com/ScriptReference...aTime.html), so if I don't adjust it, it's no longer an accurate value relative to the timescale.

EDIT:
Well, after some more investigation, others seem to agree that the Unity docs are actually wrong on this and fixedDeltaTime should *not* be modified when changing timescale. I guess that clinches it! I've reported the incorrect docs to Unity.

https://forum.unity.com/threads/adjustin...le.869491/
https://forum.unity.com/threads/rigidbod...mo.751352/
Reply


Messages In This Thread
RE: Timescale changes cause rope to jump around - by dasbin - 26-09-2020, 05:24 PM