Make a translation and a rotation on a spaceship

Hi guys !

I want to do a translation and a rotation on the spaceship of my game so it follow the terrain as you can see below :

For me the best solution would be to make the rotation on the z axe of the ship with the y axe always looking at the transform position of the terrain at the top of the picture.

I don’t know how to do it correctly, I already tried some things with the LookAt method but nothing worked so far.

What’s the best solution to do it properly ?

I’d probably make the spaceship a child of an empty game object. Place the empty parent object at the actual rotation point (so, the top of the yellow arrow in your image). Then, move the child object (the spaceship) down to the position you show it in your image. Then, when you rotate the empty game object, the spaceship should rotate with it much like a pendulum - which seems to be the effect you’re looking for.