22-11-2021, 01:05 PM
(22-11-2021, 11:33 AM)josemendez Wrote: Yes, you could find the "damaged" particle and place an object there using the particle API:
http://obi.virtualmethodstudio.com/manua...icles.html
Note this would just give you a position to place the object at, not an orientation (remember that ropes do not model torsion, unlike rods).
You could also just determine the damaged zone using a normalized coordinate from 0 (start of the rope) to 1 (end of the rope) and use pathSmoother.GetSectionAt(coordinate). This returns an orthonormal frame, complete with position and orientation - in case of ropes, since the simulation does not output an orientation, orientation is determined using parallel transport.
There's a utility script included that will place an object at a normalized position in the rope using GetSectionAt:
/Obi/Scripts/RopeAndRod/Utils/ObiRopeAttach.cs
How can I get the coordinate you mentioned when an object touches the area I want to damage?