0 votes

so I'm trying to make a racing game and the built in car physics aren't enough for me, it is missing camber, caster, toe, tire compound, tire wear, flexible tires, etc. anyway, i was wondering how i could simulate each tire, as in i want to know if it could be done with a for loop, or better/faster to do with running code on each tires node. also i want to know how i could use body lean to calculate the individual weight on each tire. and the only way i think i could do that is if i had a kinematic body for each of the tires and the body, but then i don't know how i could make the body lean with the g-forces as the car turns/brakes/accelerates.

in Engine by (20 points)

1 Answer

0 votes
Best answer

It would be easier to calculate this through variables like

weightOnFrontRight = weight + lean - acceleration
weightOnBackLeft = weight - lean + acceleration
by (3,257 points)
selected by

ok, i'm sorry, i shouldn't have gone off on a tangent. i was mainly asking how i can use joints to hook my wheels to the car body and have the car body roll.

Try using a SliderJoint for each wheel.

thank you very much, but one last thing, is there anyway i could have the dampening on extension greater than on compression.

You set a variable to the last y position local to the joint and check if the current y position is more or less than the variable, then set the damping for it. I don't know how to set the damping though. The SpringJoint doc just says set_param(value) in every property :/

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.