How would i check what direction my character is facing relative to the camera?

Hi there! I’m just wondering how I check what direction the player is facing relative to the camera rotation. I’ve been stuck for a while however i cannot find the issue.

Example:

How do I know if the player is facing right or left?

Hello,

I understand what you mean, but I don’t fully understand how you intend to implement this?

So i want a dodge, because of the way the movement is and the way it rotates i wanna detect if the player is facing right to dodge right, etc

And the game is completely 2D?

If so, just get the FORWARD VECTOR and multiply it by -1 (assuming you want the dodge in the opposite direction).

Then you could compare the value to the dodge X values.

So, if X is between 0 and 180, dodge left.
If X is between 0 and -180, dodge right.

EDIT:

I would connect a PRINT STRING to the RELATIVE LOCATION of your CHARACTER MESH in a TICK EVENT to see what it’s doing when you move it.

Just get the dot product of the camera right vector and the characters forward vector:

if ( DotProduct > 0.0 )
    // Character is facing right relative to camera
else
    // Character is facing left