Playmaker Forum

PlayMaker Help & Tips => PlayMaker Help => Topic started by: thierry_st_malo on January 25, 2018, 05:21:51 AM

Title: Get Wheel Collider Is Grounded Action
Post by: thierry_st_malo 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.
Title: Re: Get Wheel Collider Is Grounded Action
Post by: 600 on January 25, 2018, 05:45:23 AM
In the screenshot, there is None in Wheel variable.
Title: Re: Get Wheel Collider Is Grounded Action
Post by: thierry_st_malo 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.
Title: Re: Get Wheel Collider Is Grounded Action
Post by: 600 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.
Title: Re: Get Wheel Collider Is Grounded Action
Post by: thierry_st_malo 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.
Title: Re: Get Wheel Collider Is Grounded Action
Post by: 600 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
Title: Re: Get Wheel Collider Is Grounded Action
Post by: thierry_st_malo 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?
Title: Re: Get Wheel Collider Is Grounded Action
Post by: 600 on January 25, 2018, 11:46:38 AM
Can you show the same action with Debug at runtime? Is it None still?
Title: Re: Get Wheel Collider Is Grounded Action
Post by: thierry_st_malo 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".
Title: Re: Get Wheel Collider Is Grounded Action
Post by: djaydino 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 :

(https://i.imgur.com/ORWTRdL.gif)

Title: Re: Get Wheel Collider Is Grounded Action
Post by: thierry_st_malo on January 26, 2018, 05:33:16 AM
Hi, Djaydino ! That's a new one on me. I'll try that.

Many thanks.
Title: Re: Get Wheel Collider Is Grounded Action
Post by: djaydino on January 26, 2018, 05:47:22 AM
Hi.
Let us know if you got it to work :)