Playmaker Forum

PlayMaker Help & Tips => PlayMaker Help => Topic started by: 1982 on December 05, 2013, 05:34:44 PM

Title: How to check if Joint is connected?
Post by: 1982 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?
Title: Re: How to check if Joint is connected?
Post by: uberwolfe 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 :)
Title: Re: How to check if Joint is connected?
Post by: 1982 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.