Announcement

Collapse
No announcement yet.

Rotate input direction with camera movement.

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    Rotate input direction with camera movement.

    I am using the base Rolling demo provided by Unreal as a jumping off point for learning to code in BP. What I am trying to achieve is to add the ability to rotate the camera around the rolling pawn by pressing Q or E to rotate 90 degrees respectively. I have got that up and running, but I want to similarly change the torque direction with each input so that the WSAD movement aligns with the direction the camera is now facing. I assume that what needs to happen is to multiply the X and Y values for the related Forward-Back/Left-Right inputs by (-1/+1) then alternate to (+1/-1) with the alternation recurring for each press.

    Below are the visual descriptors of what I am trying to achieve, as well as the basic scripting that is used for reference.

    Still very new, so I am sure the answer is easy, but have been struggling on it for too long!

    Thanks for the help in advance.
Working...
X