Character Not Facing Correct Direction (Joystick)

I tried something like this but sadly no joy:

Would it be possible for an example as I think I’m a little lost?

Again thanks for working this out with me. However this seems to have set the character to rotate as well as the camera, plus you can also see that why the joystick is up the it spun to the left. I’ve got another example if it helps where you can see the camera shouldn’t move just the character.

Also here is an example video of what happened when I ran your new example.

I changed the input config, you’re probably right about setting it up the other way but at this time I think that might be a little over my head. Thanks for all your help though.

Hi guys I’m having a small issue with my character input rotation in general, I have the left virtual joystick set up to make the character rotate but I it isn’t making the character point in the correct direction. If the joystick is held right the character will face down.

Also if i’m using the left joystick as well which is the character movement at the same time the character rotation doesn’t set when released. So if I use the left joystick to make the character move while hes facing up, and the continue to make the character move while then using the right joystick to make the character face left the character will face left while being held but on the release of the left joystick the character will go back to the original facing being up. However if I just us the left joystick this issue doesn’t occur only when they are both in use?

200408-example3.png

Assuming you’re using the CharacterMovement component on your Character BP class…

Make sure you have the Orient Rotation to Movement property unchecked.

Set the rotation of the whole actor, not just the mesh, or use [Add Controller Yaw Input][1](as long as you also check Use Controller Desired Rotation) to make gradual relative changes to the rotation.

Use Add Movement input to move your character.

Heya, thank for replying. Unfortunately I already have Orient Rotation to Movement property unchecked. Not really sure what else it could be, is there a way to simply plus or minus degrees?

You can call the function Add Controller Yaw Input on your pawn, and send in a float value.

don’t also set the mesh world rotation, that should be updated by the movement component. Also, I think that the event being called is OnTick, so you don’t want to add 90 every tick, maybe just the axis value.

Updated with example

No problem, happy to help.

If you don’t want the camera to rotate with the player’s direction, uncheck Use Pawn Control Rotation on the camera’s Camera Settings section.

Hmm, quite strange as I already have this unchecked. When I check it the camera doesn’t move and is facing forwards rather than down on to the character. Not really sure what could be going wrong here. I’ve hosted my project if that helps?

Use a Spring Arm, and make the Camera a child of that… then on the arm, Uncheck Inherit Pitch, Inherit Yaw Inherit Roll

This has almost work for me, the camera isn’t moving anymore my movement joystick is working as usual but my rotation joystick up is down and down is up, yet left is left and right is right. Any ideas?

Example:

You can give the axis a negative value in the input configuration to flip the direction. Or you can negate the value manually in the code once it comes out of the event.
I suggest you set up North, South, East, West text renders in your game so you know which way things should be moving.

I don’t know if the axis inputs for X and Y are the same as the in engine coordinates.

I suggest setting your player’s rotation to 0,0,0 and using the way he points, as north. Which is facing X+.