I guess your flashlight moves independently of your player? Usually you would keep the flashlight locked to the camera and the camera is usually locked to the playerâs forward axis(though x axis is made independant to look up and down). But you may be doing things differently soâŚ

To get the angle between the two, you need the vectors corresponding to your desired axis.

The playerâs Y+ axis vector is `player_object.getAxisVect([0,1,0])`

Use the same method to get the flashlightâs forward vector. Depending on how you built the flashlight, forward would be [1,0,0] if X+ is forward, [0,1,0] for Y+, [0,0,1] for Z+.

When you have the two vectors, you get the angle with `angle = vector1.angle(vector2)`

This returns in radians. If youâre more comfortable with degrees, you will have to import the math module - `import math`

and use the degrees() method

`angle = math.degrees(vector1.angle(vector2))`

There may be much simpler ways to do this but it all depends on how you have constructed your player-flashlight hierarchy. Thereâs no one right way to do it but most of the time there are more efficient ways to do it that will save CPU/GFX resources.