How would I get my character rotation to match the gamepad stick orientation?

Hey ,

Here’s one possible solution, I’ll include a short primer for how this is setup:

  • Using Third Person Blueprint Template as the base
  • Modified ProjectSettings > Input to have FaceNorth and FaceEast events for Y-axis and X-axis of the Right Gamepad Stick, respectively
  • After removing some of the old Axis Events from the below list, you’ll want to delete their Events from the Graph (if you compile after removing them from the settings list, they’ll be tagged yellow for you by the editor so you can just delete them)

Edit: Here’s what all of my Axis events look like, just to be clear on how they’re setup and what I removed from the Template:

6003-twinstickinputs.png

  • In the MyCharacter Blueprint, changed spring arm component to not use controller view rotation and adjusted the length of the spring arm to 700 and the rotation of the spring arm to (0, -90, 0) (this step keeps the camera in a fixed, top-down position)

  • In the MyCharacter Blueprint Defaults, search for Orient Rotation to Movement and make sure it is un-checked.

I think that’s the only other modifications I made outside of this setup in the Eventgraph in MyCharacter:

This setup only rotates the Mesh (and not the capsule component, which is the root of the whole blueprint). Basically, the axis values make an input (like was being done in some of the other screenshots in this example), then the inputs are made into a 2-d vector (Z = 0). We then take the Actor’s location and add this new vector to get a target location to look at, which is fed into a Find Look at Rotation node (super handy node, btw) and we set the Mesh’s world rotation to that new rotation.

If you have any questions about this setup, please let us know!

Hope this helps out!

-Steve