Up to date

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

Transform3D

A 3×4 matrix representing a 3D transformation.

Description

A 3×4 matrix (3 rows, 4 columns) used for 3D linear transformations. It can represent transformations such as translation, rotation, and scaling. It consists of a basis (first 3 columns) and a Vector3 for the origin (last column).

For more information, read the "Matrices and transforms" documentation article.

Примечание

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

Tutorials

Properties

Basis

basis

Basis(1, 0, 0, 0, 1, 0, 0, 0, 1)

Vector3

origin

Vector3(0, 0, 0)

Constructors

Transform3D

Transform3D ( )

Transform3D

Transform3D ( Transform3D from )

Transform3D

Transform3D ( Basis basis, Vector3 origin )

Transform3D

Transform3D ( Projection from )

Transform3D

Transform3D ( Vector3 x_axis, Vector3 y_axis, Vector3 z_axis, Vector3 origin )

Methods

Transform3D

affine_inverse ( ) const

Transform3D

interpolate_with ( Transform3D xform, float weight ) const

Transform3D

inverse ( ) const

bool

is_equal_approx ( Transform3D xform ) const

bool

is_finite