Player movement on a moving Ship


Im working on an early prototype and i havent found a good solution for my problem.
I want to move a player (with attached Rigidbody) on a ship (with attached Rigidbody). The ship can be moved via cockpit. When the ship changes its position/rotation, the player should stay on the same position relative to the moving ship.

I tried different solutions:

  1. set the velocity of the player to the velocity of the ship via Rigidbody.GetPointVelocity
  2. fixedjoint (did weird things for me)

My game should support multiplayer on some point.

Any ideas?

thank you in advance

The most “realistic” solution is fine-tuning the values for friction between the two bodies. The reason in the real world why the player is moving with the boat is friction, so why not just implementing it that way?

I definitely not recommend parenting Game Objects with Rigidbodies attached!

Move the RigidBody of the ship and player in Fixed Update.