How to flip 2.5D character's rotation direction?

Hello all,

I’m having an issue identical to [this older thread][1], where I have a 2.5 sidescroller setup. I’m trying to make a 3D character rotate clockwise instead of counter-clockwise. My character is facing positive X, however, I noticed in the 3D Sidescroller template, the character is actually facing positive Y, and the spring arm and camera setup is rotated to face the character, instead of being 90 degrees to the character’s side.

In my Character Movement component, “Orient Rotation to Movement” is set to True, and “Use Controller Desired Rotation” is set to False (both the same as the Sidescroller template). And in the Class Defaults, “Use Controller Rotation Yaw” is also False (again, same as the template).

So basically the only real difference is the character’s initial orientation (mine positive x, template’s negative Y).

  1. I’d like to, at the very least, be able to rotate my character clockwise, in my current setup, keeping playable movement in the X and Z axes without having to switch everything to the Y and Z axes like in the template (unless that’s the only solution!).

  2. However, I would also love to find out how to rotate counter-clockwise when moving right, and ALSO rotate counter-clockwise when moving left.

I know everyone has their own business to take care of, and I greatly appreciate any time you can spare to offer a bit of advice on this.

Thanks and have a great day!

-Adam

Well, I found one solution:

By switching off “Orient Rotation to Movement” and calling the turn as a custom event through Tick ([thanks to Est_Engine’s comments here][1]) I was able to make the 2.5D character do a full 180 degrees turn left or right as soon as A or D are pressed, rather than requiring the button to be held down. By only setting half of the desired rotation and then adding the other half in the custom event, the blueprint is “tricked” into making the character face toward the camera when turning, rather than away from it (at least for a character with positive-X forward, and constrained movement to the X/Z axes). (Click link at bottom of post for larger image.)

This setup effectively makes the character turn counter-clockwise RIGHT and clockwise LEFT (facing the camera in both motions). I haven’t figured out how to make counter-clockwise LEFT, while keeping counter-clockwise RIGHT, but this setup is more “traditional” anyway.

However, I wish there was a simple way to just “flip” the direction of rotation from within the character movement component. In the Sidescroller Template, the character has positive-Y forward,and the camera and springarm FACING the character (rather than being 90 degrees to the side), to somehow hack this and achieve a camera-facing L/R turn without all the blueprint setup I’ve shown here. However, the template setup is also limited to having to hold the A/D buttons down to complete a turn rather than it being immediate. It tries to remedy this somewhat by having a high-rotation rate (720) in Z.

Anyways, I hope this info helps someone. I’m still open to suggestions if someone knows of an alternate or easier way to flip the direction of rotation. Thanks!

~Adam

2 Likes

I finally tested with a character aligned with positive Y forward, and constrained to the Y-Z axes, like in the sidescroller template. If you set everything up this way, you will be able to turn toward the camera, even if “Orient Rotation to Movement” is True, and you use nothing other than the InputAxisMoveRight event as shown above. However, in order to have your character start facing right with this setup (instead of forward) you will need to add an additional -90 in Z to the character’s BP after dragging it into the level (See below). I still think there should be a setting to quickly switch your rotation direction, though, regardless of your forward axis.

My solution was simpler, reducing the axis by 0.005 in each direction, forcing an angle of 179.995 facing the camera.

1 Like

Glad you found a method that worked for you. I’m sure there are many different ways to achieve a similar result. I know I posted this quite a few years ago, so I haven’t investigated further. But basically my findings at the time for the most simple method was to just mimic the Character BP setup in the Side Scroller template (as described in my very last post in this thread).