Godot Version
Godot 4.1
Question
Hello!
I’m looking for the Godot 4 equivalent to Unity’s AddForceAtPosition(…, ForceMode.Acceleration) for RigidBody3D. Perhaps a few extra lines of code with apply_force()? I’m getting different (very bouncy) behavior compared to the video. (I’m using Jolt physics btw.)
This is the tutorial of the functionality I’m working through. How to make a Hoverboard using Rigidbody Physics in Unity 2020 (youtube.com)
Thanks!
~ k
Cool new forum btw.
It’s just “apply_force(direction_vec, position_vec)”
There is also add_constant_force(dir,pos) and apply_impulse(dir,pos)
For the bouncyness issue you may need to fiddle with the physical aspects of the body. Godot4 got rid of bullet physics and are now running their own. It kind of sucks. You can get a plugin to get bullet physics engine back.
1 Like
I think if you take the resulting force vector from that tutorial and multiply it by Rigidbody3D.mass it will closely emulate ForceMode.Acceleration.
I’ve been trying to replicate the ForceMode.VelocityChange myself, which hasn’t been easy. I too get a much bouncier result than I want.
I’m planning to try the Jolt physics engine and see what that changes…
1 Like
Thanks for the response! I had recently started using Jolt for Godot. Highly recommend!
Thanks! I probably should have said that I am using the Jolt plugin from the asset llibrary.
Jolt didn’t change anything for me as far as bounciness. I realized I’d put a +
instead of a -
in my pid controller code 