+1 vote

Does anyone have an idea how to make character move on slope and does not slides down (as it is sliding in plaformer example), like in old platformer game. Does anyone know how to make character moves on slope like in old platofrmers, i.e. when you press right character follows slope without jumping when slope angle changes, and without sliding down when you let go right button. I just cant find any working example for oldschool platformer for Godot that works like old platformer games.

in Engine by (244 points)
edited by

Well aware this is an old question, but https://godotengine.org/article/godot-31-will-get-many-improvements-kinematicbody should at least make this easier to achieve with 3.1.

1 Answer

+1 vote

Have you tried the "kinematic character" project in the official demos? It's a great example of how to do what you're looking for.

You can find them here: https://github.com/godotengine/godot-demo-projects

Look under "Releases" for a 2.1 download, or clone the repo for 3.0.

by (21,932 points)

Yes, I have tried kinematic character in demos and my question is directlty related to problems in that demo - jumping when change occurs from climbing a slope to decending it, and sliding down when you dont press any direction and you are on a slope. It seems that Kincemtic Body is designed to make custom physics which aproximates "real" physics, which defeats the purpose of custom physics, we already have Rigid body.

I have noticed that many people have same isue making old school platformer and no solution. It would be nice if someone from community would share working example of oldschool platformer that works as it should work.

At least it would be nice to know is KinematicBody way to go in making oldschool platoformers wich dont have all this issues, or to go with completely custom physics/collision detection.

I have the same problem. It would be nice if there is an example. I'm looking for something more like Super Meat Boy. :/

I got a great (cough) idea.
Increase gravity when the player is on the ground :D
The problem is that the speed increases when you go down the slope... Ok, need some fixes. But it works.


Powered by Google Translator

I tried to code my own physics from scratch, https://drive.google.com/open?id=1RH0Zb1ImG7rZmP_BdXzG4UvHhs3JRQDp , it's not so good for slopes but the one I implemented kinda Works, it might help as reference to make a better one, lets hope for the devs to add generic collision detection classes in the future so we can make custom physics a bit more easily

After some time I came to a conclusion that needs to implement a custom physics too. :/
You example show me another solution for a problem. Make player overlaps the slope.

I will try make a custom physics and see what I get... No hacks this time :D

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.