Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Help  Unity physics interaction on v7.0
#5
(21-08-2024, 09:40 AM)goosejordan Wrote: Another library (for hand interaction) was modifying the fixed timestep length as per a setting. This would work in the previous version getting its updates from there.

Obi still gets its fixed timestep from Unity's fixed timestep value. What it doesn't use is Unity's maximum allowed timestep, that puts a limit on the amount of times FixedUpdate() can be called per frame. Instead each solver has its own maximum amount of steps, this allows you to have finer control over how much budget is spent on particle simulation.

(21-08-2024, 09:40 AM)goosejordan Wrote: A bit of an odd solution on the other library to modify fixed timestep. I see the need for it, VR hand physics look smoother if it updates with the framerate, but modifying fixed timestep is not the right way Lengua 

Not an ideal solution, agreed. I guess they wanted to both have the hand update in sync with physics (probably for rigidbody interaction) but at the same time be as smooth as possible, so they just synced the fixed timestep to the framerate.

In these cases using interpolation is a better solution, as it allows you to have both smooth visuals and an adequate timestep.

(21-08-2024, 09:40 AM)goosejordan Wrote: It is no longer possible to update Obi with the framerate, right?

Depends on what you mean by "with the framerate". If you mean using a variable timestep (like in Obi 6 when using ObiLateUpdater instead of ObiFixedUpdater) then no. This was a deliberate choice, since using a variable timestep tends to make simulation unstable and doesn't allow for async simulation (keeping worker threads busy in-between frames, which is where most of the performance gains in Obi 7 come from).

If you mean having Obi updated exactly once per FixedUpdate(), then yes: just set the ObiSolver's "max steps per frame" to max allowed timestep / fixed timestep (or just a really high value).

kind regards,
Reply


Messages In This Thread
RE: Unity physics interaction on v7.0 - by josemendez - 21-08-2024, 10:01 AM