Skip to content

SpaghettiCodeMasterThe/VehicleWheel3D

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

13 Commits
 
 
 
 
 
 

Repository files navigation

VehicleWheel3D

Problem: When the suspension compresses fully, the normal force becomes massive, and since friction is often calculated as $\text{Friction} = \mu \cdot F_n$, the grip becomes "infinite," causing the car to flip or stop instantly.

Solution: Download Godot source and replace vehicle_body_3d.cpp and vehicle_body_3d.h

How to use: 2 new parameters in WheelBody3D inspector:

image

Before and after comparaison: https://github.com/user-attachments/assets/4cc6e45d-2bfe-4770-b43f-c80d421c132e

Wheel Compressed Suspension Threshold: This is a distance in meters. If your Rest Length is 0.15 and your Travel is 0.1, the absolute minimum suspension length is 0.05. Set this threshold slightly higher than the minimum (e.g., 0.06) so it triggers just before bottoming out.

Wheel Compressed Friction Slip: Set this to something very low, like 0.2 or 0.5, so the tires immediately let go and slide upon impact.

About

Fix for wheel having too much grip will landing or hitting a ramp

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages