playMaker

Author Topic: Game object is grounded [SOLVED]  (Read 3807 times)

tim.holman

  • 1.2 Beta
  • Playmaker Newbie
  • *
  • Posts: 49
Game object is grounded [SOLVED]
« 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!
« Last Edit: February 29, 2012, 01:05:43 PM by Alex Chouls »

Alex Chouls

  • Administrator
  • Hero Member
  • *****
  • Posts: 3999
  • Official Playmaker Support
    • LinkedIn
Re: Game object is grounded
« Reply #1 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.

tim.holman

  • 1.2 Beta
  • Playmaker Newbie
  • *
  • Posts: 49
Re: Game object is grounded
« Reply #2 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!