I’m trying to make it so my character can move sideways with his head pointing straight forward but for some reason my character keeps turning it’s head towards where it’s going instead of looking straight forward from the rotation the button was pressed.
The default animation setup turns the entire body in the movement direction, including the neck and the head.
To move the head separately from the pelvis/body/spine, you will need to update the animation blueprint. Pick a bone in the neck, and set its orientation to some parameter of the animation blueprint. In your Character Tick function (or in the animation blueprint tick) calculate where you want the head to point (for example, in the Control Rotation direction, or perhaps some blend between control rotation and forward rotation) and set the parameter to that value.
I do want the whole body to point at the same direction. I just dont want it to rotate towards the movement direction, would that be any different solution?
I just want to have the whole body move in 1 straight line, like walking sideways.
The character movement component has a “face towards movement” mode that you can turn off.
It also has a “use control rotation” mode that you can keep on/off.
There’s also the “inherit control rotation” for the camera spring arm itself, for each of pitch/yaw/roll.
Finally, there’s the coordinate space that you use when adding movement input. This could be based on the camera orientation, or based on the character orientation.
Thus, if you want the “move right” button/axis to always move right compared to the camera, you’ll get the camera’s right vector (probably normalized to 2D) and use that for Add Movement Input. But if you want “move right” to move right compared to the character (pawn) then you’ll use the pawns right vector instead. (Again, normalized to 2D)
So, with these different flags and modes, you can emulate anything from “temple run” to “dual stick shooter” to “quake look spring” camera/movement inputs. You just have to think carefully about how they interact when you configure them.