# Find Up/Down Angle of Mouselook Camera

You are about to reply to a thread that has been inactive for 4062 days.

Please take a moment to consider if this thread is worth bumping.

## Recommended Posts

I am trying to find the Up and Down angle of the mouselook camera. I need to know when the camera is aiming down/up on the Y axis and at what angle.

Currently using llGetCameraRot() I get different values depending on the direction I am facing. Sometimes down is -.5 and sometimes it is .5

##### Share on other sites

As I understand it, you want the angle between the camera forward and the horizontal plane:

float angle = PI_BY_TWO - llRot2Angle( llRotBetween( < 0.0, 0.0, 1.0>, llRot2Fwd( llGetCameraRot())));

:smileysurprised::smileyvery-happy:

##### Share on other sites

Worked it out yesterday, but thank you for your response :matte-motes-bashful-cute-2:. I'm gonna plug this in to see if it will work as well. We came up with...

`vector fwd = llRot2Fwd(llGetCameraRot());vector euler = ((fwd * RAD_TO_DEG) * 3);integer angle = (integer)(euler.z);`

##### Share on other sites

Bash Quandry wrote:

`vector fwd = llRot2Fwd(llGetCameraRot());vector euler = ((fwd * RAD_TO_DEG) * 3);integer angle = (integer)(euler.z);`

That is an approximation and may work OK for you.

I don't know how accurate you need it:smileysurprised::smileyvery-happy:

Completing your idea is leading to this accurate expression:

`vector fwd = llRot2Fwd(llGetCameraRot());float angle = llAsin( fwd.z)*RAD_TO_DEG;`

##### Share on other sites

You are about to reply to a thread that has been inactive for 4062 days.

Please take a moment to consider if this thread is worth bumping.