When using Godot and you want to walk inside a moving car or ship, how to achieve this — you just need to set up node hierarchy correctly, godot will automatically convert movement to local space .
But don’t use RigidBody as the interior of vehicles, because you won’t like walking inside a moving RigidBody, AnimatableBody or VehicleBody. Simply use StaticBody for the “interior ground”!
Then, for each frame, you can use a real RigidBody or VehicleBody to “drive” that StaticBody that the player is parented to.
Example setup :
node tree like :
Staticbody update script (syncing transform from the Vehicle’s Whatever Body) :
extends StaticBody3D
func _physics_process(delta: float) :
self.global_transform = $"../Ferry Simplified Experiment".global_transform
Video demo (testing GodotOceanWave with bouyancy):
