Godot Version
4.3
Question
Hello there!
I’m developing a 2D metroidvania so my character has skills like sliding on walls.
In certain parts of the map, though, there are some walls (specifically, diagonal or inclined walls) which I don’t want my character to slide on, although I want it to detect them and to stop moving.
I’m using the ray cast method:
if player.wall_ray_cast.is_colliding() and hold_direction_x:
player.velocity.y += player.wall_sliding_vel
So, it might happen that the ray cast detects them and the character would slide on them if I jump, in a glitchy way.
How can I stop this from happening? How can I make an exception for specific walls?
Thanks to everyone who could help!
Have a great day!