Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Particles collision callback ?
#3
(05-08-2021, 08:33 AM)josemendez Wrote: Hi!

There's an entire page in the scripting section of the manual focused on collision callbacks:
http://obi.virtualmethodstudio.com/manua...sions.html

Using this, you can get a list of all contacts generated each frame (either particle-collider, or particle-particle).

kind regards,
I knew it existed, thank you !!

I do have two follow-up questions after trying it out:
First I am a bit confused by the fact that collision point are Vector4 and not Vector3, are just the x, y, z components of the Vector4 the world position ?
Secondly, contacts keep existing after the original impact : I'm guessing I should check the relative speed of the two bodies, but I'm not sure what the best way to do that is, whether I should use one of the 'impulse' floats (normal impulse, tangent, bitangent, stick..?)... I'm also a bit concerned it might be quite expensive to check every contact as well as their relative velocity every frame ?

Thanks a lot for your help !
[url=http://obi.virtualmethodstudio.com/docs/struct_oni_1_1_contact.html#aa758d2c4172da3f24bfe74acd2a290f7][/url]
Reply


Messages In This Thread
Particles collision callback ? - by VincentAbert - 04-08-2021, 11:38 PM
RE: Particles collision callback ? - by VincentAbert - 05-08-2021, 10:46 AM