```
controller = GameLogic.getCurrentController()
cam = controller.owner
camHeight = cam.worldPosition[2]
```

Put that script on your camera, and camHeight will be the z-position of the camera.

If you want the angle to the other object, you could use some trigonometry. I’m not positive about this script, but it would be something like:

```
dx = abs(cam.worldPosition[0] - trees.worldPosition[0])
dy = abs(cam.worldPosition[1] - trees.worldPosition[1])
dz = abs(cam.worldPosition[2] - trees.worldPosition[2])
hyp = sqrt(dx**2 + dy**2)
theta = atan(dz/hyp)
```

That leaves you with theta, which is the vertical angle from the trees to the camera, in radians. To convert to degrees, multiply theta by 180/pi.

If you have this script on the trees instead of the camera, remember that controller.owner will be the tree object, and you would need to get the camera from GameLogic.getCurrentScene().objects[“OBCamera”]

Then you can set theta*180/pi as the value of a property, and change the image using interval property sensors.