Up to date

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

# Transform2D¶

A 2×3 matrix representing a 2D transformation.

## Description¶

A 2×3 matrix (2 rows, 3 columns) used for 2D linear transformations. It can represent transformations such as translation, rotation, and scaling. It consists of three Vector2 values: x, y, and the origin.

Примітка

There are notable differences when using this API with C#. See Відмінності API C# в GDScript for more information.

## Properties¶

 Vector2 origin `Vector2(0, 0)` Vector2 x `Vector2(1, 0)` Vector2 y `Vector2(0, 1)`

## Constructors¶

 Transform2D Transform2D Transform2D ( Transform2D from ) Transform2D Transform2D ( float rotation, Vector2 position ) Transform2D Transform2D ( float rotation, Vector2 scale, float skew, Vector2 position ) Transform2D Transform2D ( Vector2 x_axis, Vector2 y_axis, Vector2 origin )

## Methods¶

 Transform2D affine_inverse ( ) const Vector2 basis_xform ( Vector2 v ) const Vector2 basis_xform_inv ( Vector2 v ) const float determinant ( ) const Vector2 get_origin ( ) const float get_rotation ( ) const Vector2 get_scale ( ) const float get_skew ( ) const Transform2D interpolate_with ( Transform2D xform, float weight ) const Transform2D inverse ( ) const bool is_conformal ( ) const bool is_equal_approx ( Transform2D xform ) const bool is_finite ( ) const Transform2D looking_at ( Vector2 target=Vector2(0, 0) ) const Transform2D orthonormalized ( ) const Transform2D