Obi Official Forum
Help No Collision Contact - 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: Help No Collision Contact (/thread-3341.html)



No Collision Contact - 0xhex - 01-03-2022

Hello, I have just implemented obi default fluid system but it looks like no collision.

The hit object has obi collider script and I use default collision event handler script

but in the console output there is nothing!

Here the screenshot ; 

https://www.dropbox.com/s/9e0x9jmv891971k/Screen%20Shot%202022-03-01%20at%2011.43.50.png?dl=0


RE: No Collision Contact - josemendez - 01-03-2022

(01-03-2022, 09:46 AM)0xhex Wrote: Hello, I have just implemented obi default fluid system but it looks like no collision.

The hit object has obi collider script and I use default collision event handler script

but in the console output there is nothing!

Here the screenshot ; 

https://www.dropbox.com/s/9e0x9jmv891971k/Screen%20Shot%202022-03-01%20at%2011.43.50.png?dl=0

You've subscribed to solver.OnParticleCollision. This returns a list of contacts between particles (simplex vs simplex), not contacts between particles and colliders (simplex vs collider).

You want to subscribe to solver.OnCollision instead. Check the manual for details:
http://obi.virtualmethodstudio.com/manual/6.3/scriptingcollisions.html

Quote:Contacts can happen between a simplex and a collider, or between two simplices. To request the simplex-collider contact list from the solver, subscribe to its OnCollision event. To retrieve the simplex-simplex contact list, subscribe to its OnParticleCollision event.



RE: No Collision Contact - 0xhex - 02-03-2022

(01-03-2022, 09:56 AM)josemendez Wrote: You've subscribed to solver.OnParticleCollision. This returns a list of contacts between particles (simplex vs simplex), not contacts between particles and colliders (simplex vs collider).

You want to subscribe to solver.OnCollision instead. Check the manual for details:
http://obi.virtualmethodstudio.com/manual/6.3/scriptingcollisions.html

Thank you!