Player never gets grounded after jumping if he keeps moving against the wall

Here’s a video that explains it better.

and this is how i reproduce this bug… when i jump, and push forward… and i get against a wall - the player falls to the ground and never really gets grounded.

So the animation of jumping never ends. and if you notice teh animation bools - it says it’s still jumping.

My world got blocks of 2x 2y 2z, so the player can move up and down in Z lanes. And to prevent player to fall to the infinite, i have added 2 invisible walls that are cubes with colliders and no mesh renderer.

So if the player jumps and moves up - and it keeps moving up when “grounding” it still gets stuck as if its still jumping.

Adding Friction = 0 to both walls and player, prevented the object to “stick to walls”.

But this isGrounded not being detected and making animation get stuck while in the ground and moving… is annoying. I can’t figure it out. Help? :slight_smile:

How do i prevent this?

Here’s my entire VS i posted in another part of this forum…

Hi Litoid,

In which course and lecture are you?

Icy ascent ground check.

Visual script course.

I managed to fix this … Not sure if ite the best approach. I added a box to the feet. Smaller than character and a bit lower. With isTrigger.

The on trigger stay to maintain active check if its colliding. And on exit to set not grounded. On enter to reset jump counts (double jump feature) to make sure it doesnt accidentally trigger when starting to jump.

This script is added to a child gameObject of the character. Sending custom events to player gameObject to initiate animation bools in state machine.

If needed - I’ll share images. But so far its working :sparkles:

The error was that each state needed to reset isGrounded… Run state doesnt run idle state.

So i needed an external script graph to trigger this independently of the player state. Thats when i realized a separate “collisionGraph” in the same character gameObject for every type of collision to trigger custom events where its needed.

Whether its touching lava, getting coins, landing on spikes, or moving platforms, or simply touching/not touching ground… its covered :nerd_face:

So now i have these events sent to player states both idle and run, to set ground. No more floating while running again walls or floating while holding move button.

This topic was automatically closed 24 hours after the last reply. New replies are no longer allowed.

Privacy & Terms