Transform.perspective

Applies a perspective projection transform.

This transform scales points in X and Y based on their Z value, scaling points with positive Z values away from the origin, and those with negative Z values towards the origin. Points on the z=0 plane are unchanged.

class Transform
perspective
(
float depth
)

Parameters

depth float

distance of the z=0 plane. Lower values give a more flattened pyramid and therefore a more pronounced perspective effect.

Return Value

Type: Transform

The new transform

Meta