|
|
Am 09.04.2018 um 23:31 schrieb dick balaska:
> Thanks. I assume CamR is camera->right, but how is that
> different/related to Camera_Aspect_Ratio? I thought aspect ratio *is*
> the right vector.
More precisely, the camera aspect ratio is the ratio between the lengths
of the right and up vectors.
But from Bald Eagle's reply I gather that CamR is not the camera `right`
vector, but only its /normalized/ direction (and only after re-orienting
the camera according to `location` and `look_at`).
Which means that his formula for the angle breaks down if `location` and
`look_at` have identical y or z coordinates.
A simple fix would be to use vlength(CamR) and vlength(CamD) instead of
CamR.x and CamD.z. Note however that by definition these are unit length
vectors, i.e. both have length 1. So what you end up with is:
#declare Angle = 2*atan2d(0.5*Camera_Aspect_Ratio, Camera_Zoom);
Post a reply to this message
|
|