Hi,
Am a real rookie on UE4, and I started working on this project where I have a caracter walking around a sphere (like a planet). I started from blank. I’ve setup the gravity pretty easely using Add Radial Force component, and my pawn use physics so it’s falling toward the planet.
My problem comes up when I need to keep my player Up relative to the center of the planet. I tried multiple methods using Find Look At Rotation, Get Unit direction vector, and now am using LineTrace and make Rot from ZX with impact normal and forward vectore. But I ALWAYS end up with the same issue !
My player is aligned with the ground, I start moving, but at some point my caracter start orbiting a random axis even if am pressing only forward for exemple, instead of going straight !
Here is a gif of what happens exactly. I start and I go toward the place it’s seems to happen the most. When am rotating like crazy, am just pressing forward, or left/right : https://gifyu.com/image/HcOy
Edit : I found out that the player rotate around the planet X axis, and if I use mouse_x for to rotate my caracter, the orbiting axis move : New blueprint : https://blueprintue.com/blueprint/1tq1t13l/
I’ve been ripping some hair on this for 4 days now, and I don’t know what to do ! Please help !