0 votes

Hi, I apologize in advance if I can't express myself better than I do, since I'm not fluent in english.

I'm trying to make a Mario Kart-like game, so I want the vehicles to not overturn when they are in midair after jumping from a ramp. Right now, I'm using the VehicleBody node, and I tested a lot of things but I think I don't have enough knowledge to achieve what I want.

I thought the expected behaviour should be that, if the angle between the car's normal and a Vector3(0, 1, 0) pointing upwards is bigger than a certain value, the car should rotate in a way that it's normal vector goes back to Vector3(0, 1, 0). And I can't find the way to accomplish this. How can I get the rotation axis, so that the car rotates in the correct direction?

I'm happy if someone would tell me what steps should I take so I can translate it to code. (I guess I can do what I need using this VehicleBody node, right?)

in Engine by (12 points)

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.