02-05-2020, 10:02 AM
(01-05-2020, 06:34 PM)Kristaps Wrote: Made a little helper script:
unityCollider.position = obiActor.GetParticlePosition(obiActor.GetParticleRuntimeIndex(assignIndex));
assignIndex is the rope particle index
Thank you very much! I guess unityCollider is a transform of a separated GameObject. I attached the collider directly to the rod and change the center. As particles return world space positions I transform them to local space first:
Code:
collider.center = collider.transform.InverseTransformPoint(rod.GetParticlePosition(rod.GetParticleRuntimeIndex(1)));