Having trouble with my cover shooter!

Hello! :slight_smile:

I’m working on a third person cover shooter I have a problem with the camera indicating the direction in which the character can go when the character is in cover.

When the player gets into cover, pressing A or D will move the character left or right. Pressing S will get the character out of cover. Which works well.

But If I move the camera alongside the cover (Pictured below) then pressing W or S should move the character along the cover and D should get the character out of cover cos it’s the opposite direction of the cover. Which at the moment it doesn’t do. The character control is still tied to A and D which would be confusing to the player.


The controls need to be based the way the camera is facing, so what ever way the camera is facing will be the forward control. While at the same time the character can only move along the direction of the cover.

This is my movement controls at the minute:

Any help would be much appreciated, hopefully my explanation is somewhat easy to understand.