Up to date

This page is up to date for Godot 4.2. If you still find outdated information, please open an issue.

Projection

A 4×4 matrix for 3D projective transformations.

Description

A 4x4 matrix used for 3D projective transformations. It can represent transformations such as translation, rotation, scaling, shearing, and perspective division. It consists of four Vector4 columns.

For purely linear transformations (translation, rotation, and scale), it is recommended to use Transform3D, as it is more performant and requires less memory.

Used internally as Camera3D's projection matrix.

Примечание

There are notable differences when using this API with C#. See API различия C# и GDScript for more information.

Properties

Vector4

w

Vector4(0, 0, 0, 1)

Vector4

x

Vector4(1, 0, 0, 0)

Vector4

y

Vector4(0, 1, 0, 0)

Vector4

z

Vector4(0, 0, 1, 0)

Constructors

Projection

Projection ( )

Projection

Projection ( Projection from )

Projection

Projection ( Transform3D from )

Projection

Projection ( Vector4 x_axis, Vector4 y_axis, Vector4 z_axis, Vector4 w_axis )

Methods

Projection

create_depth_correction ( bool flip_y ) static

Projection

create_fit_aabb ( AABB aabb )