Snap Character Rotations?

Hello Everyone.

I’ve been attempting to solve a problem that’s driving me crazy.

Is there any way to snap the player character’s rotation?

In other words, if the player spins 90 degrees to the right, their camera will snap to the right 90 degrees that way the camera is perfectly placed.

What exactly would be the easiest way to do this?

I’m using the FPS Blueprint.


~ Jason

So, snapping 90 degrees instantly is what you want to do? (So you are deleting the mouse control).

Just add/subtract 90 from the pitch/yaw/roll on key press.

Yes, I did delete mouse control.

I have the “A” key mapped to “turn left” and “D” key mapped to “turn right.”

How exactly should I set this up?

Do I just use a Get Actor Rotation and Location node in Blueprint or am I looking at this wrong?

~ Jason

Sorry, I don’t have my PC tonight. But you are on the right track. If there is something called Get Actor Rotation, then you want to Set Actor Rotation to Get Actor Rotation +/- 90 along a particular axis (either X or Y). Select the PC in the editor, and in the Details column, you can see the relevant numbers in the Rotation row of the Transform section.

If you get stuck, try asking on AnswerHub. That should get you your answer quickly.

Thank you for the help.

~ Jason