Godot Version
4.3
Question
I’m new to Godot and I’ve been following tutorials online and experimenting with different physics-based character and vehicle controllers.
I saw in a GDC talk from Psyonix, that in Rocket League they used a custom integration of Jolt to ignore mass when applying forces to vehicles, so that every vehicle handles the same.
I’m interested in how this might be possible in Godot, but I’m finding very little information online.
In the Godot docs integrat_forces leads you to custom_integrator, but I’m lost from there. It says you can use custom integration of force, but doesn’t say how. body_set_force_integration_callback says use a callable, but what goes in the callable?
Besides all that, what I’m really wondering is if integrate_forces or custome_integrator = true
will allow me to ignore mass for applying forces, but keep the object inside the physics simulation so forces from the environment still apply afterward. The docs don’t specify what forces they are talking about all the time, and I’m not sure there is even a difference.
I’m hoping there is a way that I can put in a callable that tells the physics server to ignore mass.
I’m new and not looking for a quick solution, so if anyone could recommend further reading on this subject, I would love to dive deeper!!!
I’m going to go check out the Jolt docs next and see if I learn anything there.
Isn’t it just _integrate_forces callback?
You use it like _physics_process
Oh I see, it is mentioned in the opening description on rigidbody3d
1 Like
It doesn’t specify if this ignores mass though. Maybe it doesn’t really specify what the difference is in a way I understand.
The thing is with physics is everything can be described by energy and forces. so if you can setup the engine to do your own forces, you can essentially ignore mass by imagining it’s always 1, or whatever value you want.
Unfortunately we can’t completely ignore mass in physics. Setting it to one is “ignoring” it in a mathematical sense, but it technically is still there.
The standard force function F = m•a
can be rotated to look at acceleration a = F/m
and if m == 1, you can then imagine a = F
or F = a
So if you are integrating your own forces it is up to you then to ignore mass.
1 Like
Because I don’t know your requirements and goals I would suggest trying a prototype that focuses on the physics to see if it can meet your expectations.
I watched the gdc talk, and he generalizes engines. Godot uses mass to dictate density. And all mass defaults to 1.
Other arcade like car physics check out this talk utilizing Godot.
1 Like
Interesting!! Thank you for the educational response. I never got that far in math in school 
It’s good to know that setting the mass as one should essentially get me the behavior I want. This could save me a lot of time, thank you.
Also, this is the guy who got me into this whole physics mess to begin with! hahaha
I couldn’t help but take stab at a physics based controller after watching his floating capsule video.
Im thinking I’ll head over to Khan academy next so I can follow along with this stuff more easily in the future.