Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Obi Solver changes gravity for rigidbodies ?
#5
(14-10-2020, 10:50 AM)josemendez Wrote: If you want I can take a look at it, but that seems really strange. Simulation of rigidbodies is performed by Unity and Obi has no power over that.

Make sure it's not a timestep length-related thing though: enabling the solver will cause frames to take a bit longer to render, so if you are incorrectly applying velocities/forces or other time-dependent stuff not taking Time.deltaTime or fixedDeltaTime into account, then of course enabling the solver (or making the game heavier in any way) will have an effect on your physics. The default AddForce method already takes timestep length into account, so this only applies if you're doing it in any other way. Also keep in mind that if you're using substepping, that will update physics multiple times per timestep.



Same thing applies to Unity's joints: If you attach two rigidbodies using joints, you have the option to enable/disable collisions between them. Only difference is that for joints collisions are disabled by default, and you can turn them on. In Obi it's not just two bodies though, there might be multiple particles inside a collider, so collisions are turned on by default and you can turn them off on a per-particle basis using phases. See: https://docs.unity3d.com/Manual/class-Co...Joint.html

Ooookay so whilst shooting a video to show you the issue, I tried reducing the substeps, and it seems indeed that with 1 substep, the physics are the same as without the solver, I didn't think that would impact things that much. But then, that means I either have to run the sim with 1 substep or to run my whole game with what I use inside Obi Rope and adapt all my physics ? That would make the whole game more intensive for no reason... Damn.
Reply


Messages In This Thread
RE: Obi Solver changes gravity for rigidbodies ? - by VincentAbert - 14-10-2020, 12:31 PM