Player Rotation in a sphere planet

My videogame is full of planets and the gravity of the player change in order to walk around this planets. My problem is when I arrive at some points of the planet that the player starts to spin althought I only am press the key to move forward.

Here’s a photo of my code rotation. I take the normal of the surface in the position of the player.

I show you a gif in order to understand better my problem.

https://giphy.com/gifs/1hM7WqRn7FgDEvCjrY

I wonder if it is gimbal lock.
If it is you might be able to overcome it by passing your wire that goes to the lerp B pin through a Combine Rotators node first. Combine rotators uses quaternions which avoid gimbal lock when calculating between two rotations.

Combine Rotators?? But what I put in the park B??

I use this but the result is the same. I never have use this node before so i don’t know if i’m using it correctly

256657-rotation.png

Can you show me where a you calling Rotate event? Also you can remove multiplier on DeltaSeconds, just use InterpSpeed.

I call the event Rotate in Event tick directly, and I put the multiplier in delta for rotate more fast. I can remove this multiplier and raise the interpSpeed, but the problem i showed in the gif is still there

I’m not sure the right way but first I would try putting GetActorRotation → A,
Make Rot from Z → B

I put the nodes like you say, but the it works worse. The player are rotating non-stop all the time. is there any way to know if the problem is really Gimbal Lock?

I found the solution!! The problem was the make rot from Z. I was to put Make rot from ZX and put in the input X the forward verctor of the player. Now works perfectly. Thanks to the people to tried help me.

put Make rot from ZX and put in the input X the forward verctor of the player.

showbox

Not sure, just by watching when an axis reaches 90 or 180 degrees, does it stay stuck there and force the other axes to move differently than normal. That’s one way to detect gimbal lock.

Did you try the MakeRot answers above instead?

I’m not sure the right way but first I would try putting technorazor GetActorRotation → A, Make Rot from Z → B