Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Local space simulation
#1
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!
Reply
#2
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.
Reply
#3
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
Reply
#4
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/manua...olver.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:

Reply
#5
Ok. I have same sample as you. I think my problem is my chain ball have IsKinematic flag. Can you test it?
Reply
#6
(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.
Reply
#7
That is it! Totally missed this property. Thanks a lot! 
Reply