+3 votes

"slopestopminvelocity" for KinematicBody2D has been removed in 3.1 and it always keeps sliding. Could anybody think of a good way to reimplement some kind of slope friction?
There is the "stop
on_slope" option but it doesnt stop the body once its sliding but only prevents it from starting to slide if it has gravity.
I also tried snap and the RayShapeCollision on the feet but it didnt change the sliding behaviour in any way.

in Engine by (22 points)

i have same question, would like to know the answer,while doing some research too

2 Answers

–1 vote
Best answer

I finally figured easy way to counter slopefall. Use additional CollisionShape Node with a shape of rectangle, that is larger than your original collisionshape, and locate it in the bottom of character. Angles of rectangle naturally prevent any slope movement, contradictory to capsule. Than simply implement a code to DISABLE square collision shape on movement inputs, and ENABLE it when no such input is pressed.

by (8,097 points)
selected by
–5 votes

I use 3.1 and I still have a kinematicbody2d

by (163 points)
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 Frequently asked questions and 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 [email protected] with your username.