3D Lingo Dictionary > O-S > projection |  |

projection

Syntax

    sprite(whichSprite).camera.projection
    camera(whichCamera).projection
    member(whichCastmember).camera(whichCamera).projection

Description

3D property; allows you to get or set the projection style of the camera. Possible values are `#perspective` (the default) and `#orthographic`.

When projection is `#perspective`, objects closer to the camera appear larger than objects farther from the camera, and the `projectionAngle` or `fieldOfView` properties specify the vertical projection angle (which determines how much of the world you see). The horizontal projection angle is determined by the aspect ratio of the camera's `rect` property.

When projection is `#orthographic`, the apparent size of objects does not depend on distance from the camera, and the `orthoHeight` property specifies how many world units fit vertically into the sprite (which determines how much of the world you see). The orthographic projection width is determined by the aspect ratio of the camera's `rect` property.

Example

This statement sets the projection property of the camera of sprite 5 to `#orthographic`.

    sprite(5).camera.projection = #orthographic

See also

`fieldOfView`, `orthoHeight`, `projectionAngle`