How to get local collision point coordinates if using PhysicsServer?

Godot Version

4.3

Question

get_contact_local_position in PhysicsDirectBodyState3D actually returns the global contact point coordinates (despite the name?) as a godot::Vector3.

How can I either obtain or convert these coordinates to local (local to the PhysicsServer generated physics body that is), so I can know where the collision point is on this physics body? (potentially the visual instance generated in RenderingServer which accompany’s this physics object would also do for local coordinate referencing).

I know of Node2D and Node3D to_local functions, but these won’t do since we’re talking about an object, not a node (Correct me if I’m wrong but I believe everything created with PhysicsServer is actually a godot::Object?)

Edit: If there is no standard way of doing it through godot’s API I think It’s likely not going to be hard to write a vector math formula for this.

I think converting to local may just be a matter of getting the distance between the global coordinates of the object and the collision point (which also seems to be global despite the method name), that’s all really. I may have overthought this :smile: