a boat is floating in the water with physics (so project settings - physics2d - gravity is set to 0,0). the boat is moving and turning randomly.
the player is standing or walking on that floating boat. see image. (so if the boat is moving or turning and the player stands on the front of the boat, so he keeps beeing on that position)
the player is always rotate in same direction (so feet in “south”, head at “north”)
I tried some things out, but found nothing which worked. someone has ideas? would be very nice!
If player has rigid body and affecter by physics, your solution is Rigidbody2d/Constraint/Freeze rotation/Z
so your head will be always up.
Next, if boat turning point is a character - keep boat and character as separate game objects
If boat turning point is a boat center - you can put character into boat hierarchy and it will rotate with the nose. Or you can just update character position every frame, just put child object “PivotPoint” into boat object, and sync “PivotPoint” against character. Or calculate character.transform.position = boat.transform.position * boat.transform.forward * offset