Speed of player depends on angle of rotation


I’m currently working on a new project of mine which is a skiing game.
I want my player to move at max speed when they are facing straight down or up (going backwards) along the y-axis. If they are facing right or left their speed should be 0.
Essentially the more they are facing downhill the faster they go forward giving the illusion of gravity since it is just on a flat plane.

Been scratching my head on this for quite a while and haven’t got anything solid.
I’ve provided a diagram of what I mean if that helps.

Any advice welcome

Solved it using Vector3.Dot() !

float downhillPower = Mathf.Abs(Vector3.Dot(transform.forward, Vector3.forward));