Stop KinematicBody3d from moving up walls

:information_source: Attention Topic was automatically imported from the old Question2Answer platform.
:bust_in_silhouette: Asked By RedBlueCarrots

I haven’t found a good solution to this anywhere, does anyone know a way using move_and_slide or move_and_slide_with_snap that I can stop my player from moving up a wall?

A wall is just something my player can move on normally, is_on_wall will return true.

If I slide into a wall at the moment, and it’s not completely vertical (around 55 degrees), my player will begin to slide up the wall, before moving down again.

What I want to do is to slide along the wall without going up it at all when I walk into it.

Any help would be appreciated.

:bust_in_silhouette: Reply From: Dad3353

I don’t have slopes, but my animated creatures would sometimes collide such that one could rise into the air, and stay there, moving around above the floor. To prevent this, I ticked the ‘Y Motion’ of the ‘Axis Lock’ Property of their KinematicBody3D, and they no longer float up. I don’t know if this would solve your issue; try it, perhaps…?