How do I set up a "wrong way" HUD when actor is facing the wrong direction

Hello!

I am building a racing game where the car is always facing north. I’m unsure how to create a blueprint where if the car is facing south then a “wrong way” text will pop up on the screen.

I’m having trouble figuring out how to get actor rotation and set a bool when the rotation is a specific number.

Cheers!

Determine this through the Dot Product of two vectors.

The two vectors would be

  • The North Vector
  • The Player Direction Vector (the forward vector of the player actor)

The possible values when you dot these two together can be seen here: Range of the Dot Product of Two Unit Vectors

In that diagram, if red is the North vector and blue is the Player vector, then the value will be close to -1 when it is in the opposite direction. So you can check if the player is facing the wrong way when the dot value is, say less than -0.85