Joint3D allow bodies to offset, joint does not lock bodies in place

Godot Version

v4.7.2.stable.steam [ed1daf0bf]

Question

How i can fix this issue where two bodies connected via joint still can move apart or close to each other and do not keep they original position

Full map of my joint system

-Node3D
--SteerFrontLeft_Joint [ Car_RigidBody-> SteerPartFrontLeft_RigidBody ]
--SteerFrontRIght_Joint [ Car_RigidBody -> SteerPartFrontRight_RigidBody ]
--RearLeft_Joint [ Car_RigidBody -> WheelRearLeft_RigidBody ]
--RearRight_Joint [ Car_RigidBody -> WheelRearRight_RigidBody ]
--FrontRight_Joint [ SteerPartFrontRight_RigidBody -> WheelFrontRight_RigidBody ]
--FrontLeft_Joint [ SteerPartFrontLeft_RigidBody -> WheelFrontLeft_RigidBody ]
--NoCollideFrontLeft_Joint [ WheelFrontLeft_RigidBody -> Car_RigidBody ]
--NoCollideFrontRight_Joint [ WheelFrontRight_RigidBody -> Car_RigidBody ]
--Car_RigidBody
--WheelRearLeft_RigidBody
--WheelRearRight_RigidBody
--WheelFrontLeft_RigidBody
--WheelFrontRight_RigidBody
--SteerPartFrontLeft_RigidBody
--SteerPartFrontRight_RigidBody

NoCollision joints disable all limits (angular and linear) and just to disable collision between two bodies
SteerJoints have disabled Y axis angular limit and enabled angular Y axis spring and their equilibrium_point is 33 degrees
WheelJoints have disabled Y linear limits, X limits (front wheels have enabled motors on X axis) and enabled Y axis spring

Video demonstration


Bodies after some time


Original shape of car

I know i can build a car using car using VehicleBody3D and VehicleWheel3D but i want to make some physics toys but this sloppy joints are really frustrating.

Thing is - once you have physics moving your bodies you can’t make them stay anywhere. You can apply forces to bring them there, but where they end up is decided entirely by the sum of all the internal and external forces.

It is hard to tell from the video, but I think what pulls your construction apart is the fight between the friction, gravity and inertia. Check your bodies sizes, masses, and the limits strenght configured on your joints. Are you sure an equivalent real world physical system would not behave in exactly the same way?

Also, it is weird to use a dummy joint just to disable collision. This flag is useful when you already have the bodies connected, otherwise it makes more sense to use collision layers.

In short: the main problem is mass ratio.
The problem was that the joint damping was too high, so the force trying to return them to their original position was too weak.

The mass ratio and spring settings were incorrect. The damping was too high and damped the force trying to return the wheel to its original position. I now use the formula 2 * sqrt (mass * stiffness) for the damping value, and it works perfectly.

Here is video