Having an issue getting a player to change positions relative to a boat's rotation

87 Views Asked by At

What I'm trying to do is make it look like the boat is moving the player with it as the boat turns. As of now, when the boat turns, the player just stays in the same x, y position and looks like he is sliding in a circle.

I have been stuck on this for a few days now and I can't figure out how to solve this. I know that I need the angle the boat is facing, the player's distance from the center of the boat, and a way to make the player's position dependent on the boat's rotation, but I don't know the mathematical equation I need.

Here's a visual reference I've created:

position of player inside boat

1

There are 1 best solutions below

7
On

Try using polar coordinates, it would show the player's coordinates with respect to the radius(distance from boat) and angle of rotation.