0 votes

Hello. So, as of now (Godot v3.2.3), the stoponslope parameter currently does nothing except break moving platforms. I have tried moveandslidewithsnap() as well and it doesn't fix it. Everything else I have tried (set velocity.y to 0, use RayShape2D, etc) either doesn't work or messes everything up (specifically RayShape2D). I am aware that there is a workaround for this problem in 3D https://github.com/godotengine/godot/issues/34117 but it doesn't work in 2D. Thank you for taking the time to read this.

Godot version 3.2.3
in Engine by (18 points)

hmm... hack it through by getting the angle of the slope?

Ok maybe getting the slope angle and then doing some math to set the gravity to go into the slope so it doesn't slide(but only when on ground) may work. Also I may just do a feature proposal on github if it doesn't work after that.

nvm I'll bet the gravity thing won't work. opening a feature request now.

You could use a RayCast2D pointing down to detect the ground and check for angle.

The most easiest is the answer above. I use raycast to program my AI to not fall unto ledges and slops

ok thank you; I've finally found a solution to get slope_stop to work here: https://github.com/godotengine/godot/issues/47042

Please log in or register to answer this question.

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.