Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Help  Rope hierarchy
#1
I want to recycle my rope when it doesn't collide and there are no other ropes above it. I've now solved the collision problem. But what about hierarchies? How do I know there is no other rope above this rope
Reply
#2
(24-07-2024, 08:40 AM)zack_Lee Wrote: But what about hierarchies? How do I know there is no other rope above this rope

Hi!

Same as you would any component in Unity: GetComponentInParent. Keep in mind this method returns the first component found while traversing the hierarchy upwards including the one in the current gameObject.

kind regards,
Reply