playMaker

Author Topic: Get Wheel Collider Is Grounded Action  (Read 2918 times)

thierry_st_malo

  • Junior Playmaker
  • **
  • Posts: 58
Get Wheel Collider Is Grounded Action
« on: January 25, 2018, 05:21:51 AM »
Hi,

If you look at the car's left wheel, it is clearly grounded, isn't it?

The "Wheel" game object has a wheel collider that is one of its components, and the terrain has a collider also.

Yet the Get Wheel Collider Is Grounded action keeps sending the "NotGrounded" event. How come?

Thanks in advance.
« Last Edit: January 25, 2018, 05:23:58 AM by thierry_st_malo »

600

  • Beta Group
  • Hero Member
  • *
  • Posts: 713
    • Flashing Lights
Re: Get Wheel Collider Is Grounded Action
« Reply #1 on: January 25, 2018, 05:45:23 AM »
In the screenshot, there is None in Wheel variable.

thierry_st_malo

  • Junior Playmaker
  • **
  • Posts: 58
Re: Get Wheel Collider Is Grounded Action
« Reply #2 on: January 25, 2018, 07:44:18 AM »
Thanks.

But, as you can see, "Wheels" is a Game Object variable that's part of this FSM.
So, what does that "None" stand for, what should I specify instead and how could I do it?

Cheers.

600

  • Beta Group
  • Hero Member
  • *
  • Posts: 713
    • Flashing Lights
Re: Get Wheel Collider Is Grounded Action
« Reply #3 on: January 25, 2018, 07:52:53 AM »
Need to fill the variable with the game object holding Wheel Collider component.
Can do it at runtime with Find Child or drag/drop in the variable in Edit mode.

thierry_st_malo

  • Junior Playmaker
  • **
  • Posts: 58
Re: Get Wheel Collider Is Grounded Action
« Reply #4 on: January 25, 2018, 08:36:06 AM »
You're very helpful :-) but, problem : the "Wheel" game object has already a Wheel collider component. Sorry to insist.

Thanks.

600

  • Beta Group
  • Hero Member
  • *
  • Posts: 713
    • Flashing Lights
Re: Get Wheel Collider Is Grounded Action
« Reply #5 on: January 25, 2018, 08:46:02 AM »
Yes, but I mean not the component. The whole game object (holding wheel collider) must be filled in the "Wheel" variable.

Maybe I misunderstood and there is errors with the action it self?  :D

thierry_st_malo

  • Junior Playmaker
  • **
  • Posts: 58
Re: Get Wheel Collider Is Grounded Action
« Reply #6 on: January 25, 2018, 10:43:27 AM »
In this FSM the "Wheel" variable is the whole Game Object, which includes a Wheel Collider Component. Besides, I have loked at the action's C# code, and I can't see anything corresponding to that "None'

I use Playmaker 1.8.6. Perhaps the action isn't up-to-date?

600

  • Beta Group
  • Hero Member
  • *
  • Posts: 713
    • Flashing Lights
Re: Get Wheel Collider Is Grounded Action
« Reply #7 on: January 25, 2018, 11:46:38 AM »
Can you show the same action with Debug at runtime? Is it None still?

thierry_st_malo

  • Junior Playmaker
  • **
  • Posts: 58
Re: Get Wheel Collider Is Grounded Action
« Reply #8 on: January 25, 2018, 01:28:22 PM »
I had  already added a Debug Game Object action to the FSM state; it shows correctly the correct name for the correct Game Object, which has a Wheel collider. And there is nothing in the C# code of the action that corresponds to this "None".

djaydino

  • Administrator
  • Hero Member
  • *****
  • Posts: 7614
    • jinxtergames
Re: Get Wheel Collider Is Grounded Action
« Reply #9 on: January 25, 2018, 04:02:28 PM »
Hi.
If a variable state 'none' it mean that the variable is empty.
Check if the gameobject with the wheel collider is placed in value from the variable.
or if it should be added @ runtime by right-clicking on the variable to see what actions are use with it.

i made a little gif to show you what i mean :




thierry_st_malo

  • Junior Playmaker
  • **
  • Posts: 58
Re: Get Wheel Collider Is Grounded Action
« Reply #10 on: January 26, 2018, 05:33:16 AM »
Hi, Djaydino ! That's a new one on me. I'll try that.

Many thanks.

djaydino

  • Administrator
  • Hero Member
  • *****
  • Posts: 7614
    • jinxtergames
Re: Get Wheel Collider Is Grounded Action
« Reply #11 on: January 26, 2018, 05:47:22 AM »
Hi.
Let us know if you got it to work :)