29-04-2025, 03:45 PM
(This post was last modified: 29-04-2025, 04:18 PM by josemendez.)
(29-04-2025, 02:14 PM)0hsyn1 Wrote: This is what I want "The onContactEnter event in ObiContactEventDispatcher is triggered when a particle belonging to the actor first touches a collider." and using the rope as a path from that point to the end.
Then your original code using ObiContactEventDispatcher will do that. But judging from some other of your posts I was under the impression that it's not what you wanted... so I'm still a bit confused.
(29-04-2025, 02:14 PM)0hsyn1 Wrote: Is there a place or method where I can see which of the black dots appearing in the Obi particle Renderer are touching
Yes, that's what solver.OnCollision does. It's what I used in the script I shared: it iterate trough all contacts ("touch points" between particles and objects) and then finds the normalized coordinate for one of the touches.
(29-04-2025, 02:14 PM)0hsyn1 Wrote: and where I can get the world positions of all the black dots?
Yes, you can iterate over rope.solverIndices and retrieve the position of all particles from the solver.positions array. See the particles API page in the manual.
(29-04-2025, 02:14 PM)0hsyn1 Wrote: I made the fixed point static, the moving point dynamic. The object to which the rope is attached moves with Vector2 lerp. The target position is the position of the gameObject that I move with the rigidbody.
That doesn't make much sense. Dynamic attachments are meant to attach particles to a rigidbody that's moved using physics (setting their velocity, or adding forces to them), since they apply forces to both the rope and the attached rigidbody. If you use a dynamic attachment to an object, but then you move it using Vector2 lerp you're effectively defeating the point of using a dynamic attachment.
Either attach the rope to the rigidbody directly (not to an object that is then lerp'ed towards a rigidbody) or use a static attachment.
kind regards,