Confusion regarding apply_force() for rigid body 3d

Godot Version

Using Godot 4.4

Question

I’m modifying a flight sim library I found online to make it more modular with the hopes of eventually making some sort of plane building system. To that end I’m trying to make it so that each wing applies lift separately at its own center of lift rather than having the script attached to the main node apply the lift force to the center of mass of the aircraft. For some reason however it seems that this has made it stop applying any force of any kind.

I think the issue comes from me not understanding what to pass in for the second parameter of the apply force function, currently I’m just passing in the global_position of the wing node, is this correct?

No, it’s a global offset from the body’s center, it’s slightly different from local position, the default argument of Vector3.ZERO would be the center of the body, the same as apply_central_force().

So what exactly do I pass in? the global_position of the wing node minus the global_position of the aircraft node?

Sounds correct to me

Thanks for the help! Turns out that wasn’t my only issue. The function that handled physics calculations was misnamed and not getting called by the airplane during physics process. After fixing that, and changing the parameters for the apply_force() call, things seem to be working now.