playMaker

Author Topic: How to check if Joint is connected?  (Read 2274 times)

1982

  • Junior Playmaker
  • **
  • Posts: 71
How to check if Joint is connected?
« on: December 05, 2013, 05:34:44 PM »
How I make a check if a Joint is connected to rigidbody? For example in a collision strong enough, a object breaks from its joint and I would like to get that information to my FSM?

uberwolfe

  • Junior Playmaker
  • **
  • Posts: 59
Re: How to check if Joint is connected?
« Reply #1 on: December 05, 2013, 08:33:27 PM »
When a joint breaks in Unity it simply removes the joint component from its parent GameObject.

So what you can do in PlayMaker, is use the Has Component action to check if the joint component exists, if it doesn't the joint has obviously been broken and you can act on it accordingly.

Hope this helps :)

1982

  • Junior Playmaker
  • **
  • Posts: 71
Re: How to check if Joint is connected?
« Reply #2 on: December 06, 2013, 06:53:54 AM »
Thanks! This was exactly what I was after, I didn't know that the joint component is removed at the break event.