How do i rotate an actor to a new rotation rotation while keeping relative rotations

Im making a game with direction gravity so the player can walk on any surface. I have a actor with a collision box and while inside gravity goes the same direction of that actors down vector. But i cant seem to figure out how to rotate the player to the new gravity direction while keeping the direction the player was facing. So like when the new gravity is to right of the player he just rotates to the right while the camera still looks in the same direction but if the new gravity is perpendicular and right in front of the player the player would rotate upwards with the camera now facing upwards.

1 Like

Sound like you have the downward vector of the player facing the correct way.

A typical way to maintain the facing direction at the same time, is to use the new Z ( from the gravity ) and the current forward vector to make a new facing direction

You might have to tinker around a lot with these nodes

image

it really depends on your situation.

ty that works perfectly

1 Like

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.