Independent gravity volume player orientation

Godot Version



Can anyone help me with any pointers on how I could make the player stand upright inside a moving Area3D by getting the Area’s Gravity vector?
I wanted to use CharacterBody3D but the move_and_slide() function does not take into account velocity as being locally oriented so once the player is in a rotating Area3D everything breaks down.
I also tried interpolating the player rotation to smoothly flip between the old gravity and the new one but I do not know how to do this outside _process() or _physics_process() since i need delta for the interpolation time.
The issue is that once i add the code there it will always run … not just when i need it.

make a method/function that takes delta of physics process as its parameter and use it