Playmaker Forum

PlayMaker Help & Tips => PlayMaker Help => Topic started by: tim.holman on February 23, 2012, 11:49:28 AM

Title: Game object is grounded [SOLVED]
Post by: tim.holman on February 23, 2012, 11:49:28 AM
I'm looking for a way to decipher whether or not a game object (golf ball) is currently on the ground. Basically, I need the "ControllerIsGrounded" boolean check, except I need to use it for a game object, and not the character controller. Does anybody know of a good way to do this? Any help would be appreciated!
Title: Re: Game object is grounded
Post by: Alex Chouls on February 23, 2012, 03:57:13 PM
You could use COLLISION ENTER event to set a boolean variable true, then COLLISION EXIT event to set it false. Or use the Collision Event action if you need to specify Tags.

Also if the ball has a Rigid Body you can use Get Speed to test if the ball has stopped moving.
Title: Re: Game object is grounded
Post by: tim.holman on February 28, 2012, 12:40:13 PM
Thanks Alex, I ended up just setting up an fsm to check grounded based on collision enter/ exit. Seems to work good. Much appreciated!