The title may have been slightly misleading, however I have got no idea how better to describe it.
I have got 2 coordinates.
Opens up paint.net
If you look at that diagram, there is a line at the bottom. This is the sea/water that the ship will be floating on.
Now, we have 2 coordinates. One is the back of the ship, one is the front of the ship (Fine, they are off the ground. I am a bad drawer).
As you can see, the front coordinate is higher than the back one. That is because the ship has hit a land or beach, and so the front is obviously higher (i.e. ship lands but back is still in the water).
However, to tip the ship backwards, my rendering engine/library (OpenGL) requires a set rotational value.
So, I need to get the rotation from the bottom coordinate to the top coordinate, the sea level being 0 degrees.
What is the mathematical formula to do this?
P.S. Sorry if I am missing something. I am 14 and do not know my rotation matrices excellently yet.