Character Orientation Affecting Movement

Hello, first time on the answer hub!

I want my character to face the camera (I am using static cameras in my game) but my WASD input setup will make the controls confusing.

Is there a way to orient my character while keeping the input the same? My thought was to duplicate the current Blueprint and turn the character mesh opposite its capsule, but that feels counter-intuitive.

Am I overthinking this? What should I do?

It’s not clear what you want. Can you elaborate?

Yes! Apologies if the question is not worded well.

The character is in a collider capsule with a main direction, indicated by an arrow within the Blueprint editor. When I drop in a character to a map, my input (WASD on the keyboard, W being forward, A left, D right, S backwards) is mapped to whatever direction is the “Forward” for the capsule the character mesh is in.

The problem is I want my game to have static cameras that transition between each other as the player enters new rooms. Here you can see my character has its back to the camera. If I want the character to face the camera, all of a sudden, W is actually backwards towards the camera, S is forwards away from the camera. It is working as I set it up, but I don’t know if I should reverse the character in its capsule when I need a different orientation to have the input make sense, or be extremely careful in how I orient a scene. Neither seems preferable.

Does that make more sense?

Now it’s clear.

Try this. In the player character do this 2 things:

1 - Reverse the inputs W and S (you could do it in the bindings, but for now let’s not touch that):

2 - Add this script - it gets the current active camera and rotates the player’s controller to face it. Note, that it’s only the controller, not the character itself (you can add a SetActorRotation to make the character rotate towards the camera if you want it):

The delay is only necessary if you are setting this in the begin play (if so, then you should consider the delay as something temporary - requires a little redesign).

Now, all the movements are in the same direction (W moves away from the camera, …), regardless of the camera position.

Sorry for the very late reply - thanks so much!! This works.

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.