0 votes

How would you align the wheels of a 2D car to a terrain (Collision Polygon, Path/Follow or anything else) without using physics? I want the car to stick to the ground and move it along it from code. I want to calculate the gravity, wind resistance, etc. by myself.

I'm able to align with the ground the front wheel (with a kinetic body or pathfollow) but I can't find a way to make the back wheel to follow it at a fixed distance when the wheels are on 2 different slopes.

Any idea? Thanks!

enter image description here

in Engine by (12 points)

You need a physics joint to link them. Godot has DampedSpringJoint2D, GrooveJoint2D and PinJoint2D. I think one of the first two is what you need, but I never used them so I'm not sure.

without physics

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.