19-06-2020, 11:48 AM
(16-06-2020, 02:34 PM)josemendez Wrote: Hi there,
There's a class already that raycasts against all particles in a solver and returns the one that was hit: ObiParticlePicker. You can subscribe to any of its events: they receive a ParticlePickEventArgs struct as parameter, that contains both the particle index and its world space position.
Once you've got the index of the particle, you simply create a particle group that contains this index, and pass it to the attachment's particleGroup property. That's all.
I don't understand what you mean when you say "add points to the blueprint". You're referring to path control points, particles, or particle groups? By default, when you create a new control point in the editor, a particle group (that contains the index of the particle at that control point) is added to the blueprint for convenience. However particle groups can exist on their own (they're scriptable objects) there's no need to add new ones to the blueprint if you're creating/using them at runtime.
I guess I understand now, I will check this out, meanwhile I have another one question, I'm just learning all the obi stuff!)
So question is, I need call on 3d object some sort of "OnCollisionEnter()" function, like in normal unity physics, for example when cube collides with rope I want to deactivate cube, or add force to the cube, like in unity collision detection system, some sort of OnCollisionEnter function, where can I get info about that?