Obi Official Forum
Collision detection via script / disable force - Printable Version

+- Obi Official Forum (https://obi.virtualmethodstudio.com/forum)
+-- Forum: Obi Users Category (https://obi.virtualmethodstudio.com/forum/forum-1.html)
+--- Forum: Obi Fluid (https://obi.virtualmethodstudio.com/forum/forum-3.html)
+--- Thread: Collision detection via script / disable force (/thread-159.html)



Collision detection via script / disable force - Kalidor - 28-09-2017

Hi!

1. Is it possible to request collisions via script (like OnParticleCollision)?
2. The particles shouldn't add force to other rigid bodies. Is it possible to disable it?

Thank you!
Kalidor


RE: Collision detection via script / disable force - josemendez - 28-09-2017

(28-09-2017, 11:24 AM)Kalidor Wrote: Hi!

1. Is it possible to request collisions via script (like OnParticleCollision)?
2. The particles shouldn't add force to other rigid bodies. Is it possible to disable it?

Thank you!
Kalidor

1. Yes! see: http://obi.virtualmethodstudio.com/tutorials/scriptingcollisions.html
2. Enable "kinematic for particles" in the ObiCollider inspector.


RE: Collision detection via script / disable force - Kalidor - 29-09-2017

Do you mean to check "Kinematic For Particles" in the "Obi Rigidbody" component of the game object?
When it's enabled the particles' force is still there.


RE: Collision detection via script / disable force - josemendez - 29-09-2017

(29-09-2017, 07:42 AM)Kalidor Wrote: Do you mean to check "Kinematic For Particles" in the "Obi Rigidbody" component of the game object?
When it's enabled the particles' force is still there.

Yes sorry, I meant ObiRigidbody, not ObiCollider.
However I cannot reproduce the behavior you describe. When I enable kinematic for particles, the rigidbody stops "feeling" the particles. The particles are however still affected by the rigidbody, which is the intended behavior.

You can test it in the "FluidMill" sample scene. If you enable "kinematic for particles" in the mill rigidbody, it will stop spinning when the particles hit it.


RE: Collision detection via script / disable force - Kalidor - 29-09-2017

Ah, ok, thank you!

It was my fault.