Rotate planet (Sphere) to new up vector.

Im trying to create a space game. But instead of using actual gravity i want to try rotating the planet under the player. Im trying to shoot a line trace from the player towards the planet surface, then i want this hit location to point straight up. This way the impact point is always the Z in Unreal. Any ideas on how i can make this rotation?

I did this recently. It’s best to make a custom pawn, otherwise the player can move and really screw things up.

When the player ( thinks ) they are walking forward, you just rotate the planet underneath them:


It has quite a lot of stuff you don’t need, yet:

Check object = makes sure nothing is in front of the player

The main chunk takes the direction the ‘pawn’ is looking and uses that to rotate the planet around it’s right vector.

I’m afraid to tell you, there’s a bit more ( :rolleyes: ), you have to rotate everything on the planet, with the planet. If you put a load of meshes on it, it runs too slowly, because you have to attach them all to the planet. You can’t do it with the foliage editor, because they just don’t move. So, you have to make your own HISM foliage placement tool ( pretty easy ), because then you can rotate everything as one object, no load on the system.

It looks like this:

This is awesome! Thank you! Going to try this out. But I’m going to try and modify it to work on a character class