Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Help  Confused about practical use of substepping Unity Physics
#3
Thank you so much for all the information Jose. With what you said I was able to get my drone hovering perfectly again by moving my FixedUpdate logic into a callback handler for ObiSolver.OnSubstep.

However I noticed one thing when doing this, it seems to break Rigidbody interpolation. That is, my drone has a Unity Rigidbody with interpolation enabled, and normally the drone's motion looks very smooth. But when I'm using the ObiSolver and responding to OnSubstep events, the apparent motion of the drone becomes very discrete, as though rigidbody interpolation is no longer enabled. This is especially noticeable in my game because I have a mechanic whereby the game enters slow motion (1/100th of realtime), and you can very clearly see the drone jumping around in space every time the updater calls Physics.Simulate().

Is this a known issue with Unity physics substepping in Obi? Is there a normal workaround for it to get smooth motion again?

Here's a video of what I'm talking about. In the first half of the video, I have substepping Unity physics enabled and you can clearly see the lack of interpolation. In the second half of the video, I disable it and you can see the normal, smooth motion of my rigidbody. (I'm also disabling a custom component I made which notifies my other scripts that Unity physics substepping is happening so they will switch from processing inside FixedUpdate() to OnSubstep)

Reply


Messages In This Thread
RE: Confused about practical use of substepping Unity Physics - by protomenace - 01-07-2020, 03:09 AM