0 votes


I am making a platformer and I wanted to make a wall jump, if the player is against a wall, they can jump off it.
I am using isonwall(), but sometimes the function returns false even though the player is moving against a wall.
This makes the wall jump inconsistent, as the wall sometimes doesn't register. How can I fix this?
Everything else about the wall jump code works fine, btw. It's just the check if the player can wall jump that works inconsistently.

Godot version 3.2.3.stable
in Engine by (22 points)

1 Answer

+1 vote
Best answer

Try using a very short Raycast2D to detect walls.

by (7,769 points)
selected by

This works perfectly, thanks :)

Welcome to Godot Engine Q&A, where you can ask questions and receive answers from other members of the community.

Please make sure to read How to use this Q&A? before posting your first questions.
Social login is currently unavailable. If you've previously logged in with a Facebook or GitHub account, use the I forgot my password link in the login box to set a password for your account. If you still can't access your account, send an email to webmaster@godotengine.org with your username.