Obi Official Forum
Local space simulation - Printable Version

+- Obi Official Forum (https://obi.virtualmethodstudio.com/forum)
+-- Forum: Obi Users Category (https://obi.virtualmethodstudio.com/forum/forum-1.html)
+--- Forum: Obi Rope (https://obi.virtualmethodstudio.com/forum/forum-4.html)
+--- Thread: Local space simulation (/thread-2996.html)



Local space simulation - ikostyakov - 29-06-2021

Hello!

I have object structure like this

ParentObject
---Obi Solver
------Obi Chain
---ChainBall
---ChainHandle

Then I move Parent object Obi Chain's physics works. I want physics only then I move ChainBall or ChainHandle. Is it any way to do it?

Thank you!


RE: Local space simulation - josemendez - 29-06-2021

The simulation is always performed on the solver's space, so if you move the solver, any child actors will move together with it. Usual behavior you get with parent-child objects.

However you can attach ropes to any object (regardless of where it is in the hierarchy) and collisions also work with any objects. If I understood your question correctly, you can have:

ParentObject
---Obi Solver
------Obi Chain
ChainBall
ChainHandle

And just attach the ball and the handle to the chain.


RE: Local space simulation - ikostyakov - 29-06-2021

I tried:

ParentObject
---Obi Solver

------Obi Chain

---ChainBall
---ChainHandle



and

ParentObject
---Obi Solver

------Obi Chain

---------ChainBall
---------ChainHandle



then I move ParentObject chain physics reacts on it. Can I make it react on ChainBall and ChainHandle movement only?

My problem - I have floating origin and sometimes need to shift ParentObject for 500 units and more. But then I move my object pore physics works like ParentObject have huge acceleration


RE: Local space simulation - josemendez - 29-06-2021

Moving the solver object around (or any transform above it in the hierarchy) will not affect the particle physics at all, as simulation is performed in local space. Unless, you have non-zero world inertial scale parameters (see: http://obi.virtualmethodstudio.com/manual/6.2/obisolver.html)

Take for instance the "Chains" sample scene: if you place ChainBall and ChainHandle inside the ObiSolver component, moving the solver around does not affect physics. Note that rigidbodies such as the ChainBall are still affected by regular physics, of course (they're not simulated by Obi).Also note that external accelerations such as gravity will still affect the solver, so if you rotate it particle gravity will change direction. See the following video:




RE: Local space simulation - ikostyakov - 29-06-2021

Ok. I have same sample as you. I think my problem is my chain ball have IsKinematic flag. Can you test it?


RE: Local space simulation - josemendez - 29-06-2021

(29-06-2021, 01:49 PM)ikostyakov Wrote: Ok. I have same sample as you. I think my problem is my chain ball have IsKinematic flag. Can you test it?

Make it kinematic for particles (ObiRigidbody component). Otherwise it will behave as a regular rigidbody (that is, non-zero inertia tensor) as far as particles are concerned.


RE: Local space simulation - ikostyakov - 29-06-2021

That is it! Totally missed this property. Thanks a lot!