Documentation

Unity Engine


User Manual

Script Reference

Unity Engine


Swizzle

Transform a 3D position into a 3D position using the selected transform plane.
Read time 1 minuteLast updated 10 days ago

Definition

Swizzle(Vector3, TransformPlane)

Transform a 3D position into a 3D position using the selected transform plane.
public static Vector3 Swizzle(Vector3 position, PhysicsWorld.TransformPlane transformPlane = TransformPlane.XY)

Parameters

position

The 3D position to transform.

transformPlane

The transform plane to use.

Returns

Type

Description

Vector3The transformed position.

Swizzle(Vector4, TransformPlane)

Transform a 3D position (with perspective divide) into a 3D position using the selected transform plane.
public static Vector4 Swizzle(Vector4 position, PhysicsWorld.TransformPlane transformPlane = TransformPlane.XY)

Parameters

position

The 3D position to transform.

transformPlane

The transform plane to use.

Returns

Type

Description

Vector4The transformed position.

Swizzle(Matrix4x4, TransformPlane)

Transform a Matrix position (with perspective divide) into a Matrix position using the selected transform plane.
public static Matrix4x4 Swizzle(Matrix4x4 matrix, PhysicsWorld.TransformPlane transformPlane = TransformPlane.XY)

Parameters

matrix


transformPlane

The transform plane to use.

Returns

Type

Description

Matrix4x4The transformed matrix.