If you’re using the default Character pawn subclass for your character, make sure to turn off “orient rotation to movement” and then turn on “use controller yaw.”
I actually need to Orient to Movement enabled - I want my character to still be able to walk around normally using the left stick, only when I use the right stick should they face the direction the right stick is pushed whilst maintaining the left stick direction of travel.
That’s not compatible with rotating the character. But, also, I don’t think you need “orient to movement.” Characters can strafe, and back up. “Orient to movement” means that the controller will ALWAYS snap the character to face north-west, if the character is moving north-west. This is not what a typical twin-stick-shooter does.
The one case where “orient to movement” could be used together with separate controller yaw, would be if you have something like Mech Warrior, where you can move the upper torso separately from the lower legs. The legs would be linked to the pelvis and root, which would be oriented to the movement direction; the upper body/torso link would then rotate to face the torso towards the stick direction, separate from the movement orientation – it would essentially be expressed in global coordinates. This requires a custom animation blueprint.
Note that even “set actor rotation” will be overridden by “orient rotation to movement.”
However, it sounds like the other thing you need to do, is to figure out what “direction” the stick is pointing at, rather than just using the stick as a positive/negative input. To do this, you need the LookAt node. Plug the stick X into the X value of a vector, the stick Y into the Y value of a vector, and then make a “look at” orientation with Z as the up vector; that will give you an orientation. (Depending on your movement convention, you may need to add/remove 90 degrees and/or mirror this rotation. You can do this by switching X/Y or negating one of the values.)
In your PlayerController, you do something like this:
Thank you for your detailed response. I’m still not achieving the desired results unfortunately.
I’ve opted to add an arrow to my character and get that working to make it easier for now, I can get the arrow to rotate freely and point in the direction of the right stick whilst the character can still move with the left however its slightly off, seems weird.
I should mention I’m using the third person template.
So, left stick is orientating the character in the direction of movement whilst the right stick freely rotates the arrow component alas , it is off by say an eighth: making the arrow face forward the stick needs to be at the top left rahter than the top.
Thanks again for your help.
Edit: I could upload a video if that would explain it better.