Hi,
So my character pawn has a spring arm and a camera as child of the spring arm.
This camera can be rotated manualy but don’t rotate when my character move (it’s an isometric top down and dual stick game)
The left stick move the character who has “orient rotation to movement”
The right stick rotate the character when he is not moving (for aiming purpose)
My problem is that the right stick rotate it relative to world and not to camera, so when I change the camera orientation, move the right stick up doesn’t rotate the character in direction of the top of the screen but in direction of the “north”.
Here’s my actual BP which is working but is world relative:
But note that I don’t want to rotate the camera relative to the character orientation, I need to rotate the character relative to the camera orientation.
So I need a formula where the X and Y axis of my right joystick add rotation to the character and relative to the top down camera orientation, so when I put the right stick up, my character is facing the top of the screen and not the “north” of the world
Nobody? I know it’s only a math problem but I’m lost.
My problem is the A input of the Lerp node.
I tryied to get the “look at rotation” of the camera but it doesn’t work so I think I need to use its Z rotation but how?
Pretty old but happened across it while I was looking for something else.
Try setting the control rotation.
Its a specific node and you plug in pawn controller.
It does mean some of the other stuff like getting the info from the pawn might need be turned off as it basically “turns” the controller to the rotation.
Might have to do some multiplying by negative one also if things are flipped