arc
Angle that gives the horizontal field of view. It's default value of 60
degrees corresponds to the human eye. By decreasing this angle you'll
get a telescope effect.
Range
-180 .. 180 (default: 60)
Type:
var
Remarks:
- If the arc has a negative value, the view is horizontally flipped. This way rear view mirrors can be realized.
- For ISOMETRIC views, the arc defines the view volume in quants by the formula size = view.size * tan(view.arc/2). For an arc of 90 degrees, the width of the view volume is equal to the view width in pixels.
Example:
function sniper()
{
while(1)
{
if(mouse_right) // right mouse button pressed
{
camera.arc = max(camera.arc - time_step, 30); // reduce fiel of view
}
else
{
camera.arc = min(camera.arc + time_step, 90); // increase fiel of view
}
wait(1);
}
}
See also:
VIEW, view.aspect, view.flags
► latest
version online