Changing Global coordinate System

Hi Everybody,

I’m a completely UE 4 and C++ noob. Currently I’m learning Unreal Engine 4 by making a small project.
My small project is making something like Super Mario Galaxy (where the character walk/run around small planets), but limited to only one planet.

I’ve make some modification to Unreal Engine 4 code so I can set GravityX, GravityY, and GravityZ with its scale. The Default Gravity value for each Gravity direction is -980. So every Pawn that inherit from my custom Pawn will be pull towards the center of the planet.

Then, I got problem with walking my character. From what I read, The Unreal Engine is using ZAxis as up. For a sphere the Up Vector will change dynamically based on the Character (or Pawn) location. Also the it will need a tangential velocity. Right now, after reaching some points my character will be floating around the planet (since his feet are not grounded/ attach to the planet )For example, when the character reach 90 degree from Z, it will float around. The character won’t fall because the gravity is pulling him to the center.

I read this post
Adventure Kit - Architecture - Epic Developer Community Forums . However, I don’t know how to change the global coordinate system for Unreal Engine. The logic is the Up Vector will be the orthogonal from the tangential velocity. I’m also thinking on using polar coordinate then convert it into cartesian coordinate so the Unreal Engine will understand.

I know that I’m thinking too complex. I hope someone can shed me some light on this problem.

Thank you in advance for your help.

Cheers,