Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Unity Collider Position - Raycast Spherecast
#8
(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
Guiño

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)));
Reply


Messages In This Thread
RE: Unity Collider Position - Raycast Spherecast - by fishing-rod - 02-05-2020, 10:02 AM