Playmaker Forum

PlayMaker Help & Tips => PlayMaker Help => Topic started by: Adam Z on February 08, 2018, 03:31:05 PM

Title: Jump and fall setup help using Collision Event
Post by: Adam Z on February 08, 2018, 03:31:05 PM
So I have a basic jump/fall setup using 3 States. All the objects the player can land on have a "Ground" tag. The 3 States are:

"Waiting" State

"Jump" State

"In Air" State

So the ideal is when my players capsule collider leaves a "ground" id tagged object, the character is falling. It works except when there is a slope. I'm using a cube with a box collider, scaled as a ramp, and then angled. It seems that the angle causes the "In Air" State to activate when I transition from a horizontal plane to the slope. I don't think the angled collider plays nice with the capsule collider.

Any thoughts on how to fix this or use another solution?

Thanks.
Title: Re: Jump and fall setup help using Collision Event
Post by: djaydino on February 09, 2018, 05:29:10 AM
Hi.
1st thing that came on my mind is to use a trigger and make it a little bit higher than the ground 'slope' level.

And then maybe a "Slope" State
Title: Re: Jump and fall setup help using Collision Event
Post by: Adam Z on February 09, 2018, 09:15:06 AM
Hi.
1st thing that came on my mind is to use a trigger and make it a little bit higher than the ground 'slope' level.

And then maybe a "Slope" State
I appreciate the idea, but I wanted to do the least amount of setup for a 3rd person shooter. If the world is large or has a few maps, then thats a lot of setup.

Maybe I can use Raycast from the players origin, and if it doesn't hit anything after a certain length, place the character in a "falling" state.  Then maybe check the duration and if the player is "in air" for a while, when you hit a surface you're "dead".
Title: Re: Jump and fall setup help using Collision Event
Post by: djaydino on February 09, 2018, 07:10:22 PM
Hi.
Or maybe you can use the velocity, speed or force (collision event / get collision info)
When it hit  the floor and if it is harder or faster than a certain amount then "Dead"