Documentation

Unity Engine


User Manual

Script Reference

Unity Engine


PhysicsTransform

Represents a 2D transformation combining a translation and a PhysicsRotate.
Read time 1 minuteLast updated 8 days ago

Definition

public struct PhysicsTransform

Fields

Value

Description

positionThe translation for the transformation.
rotationThe rotation for the transformation.

Constructors

Constructor

Description

PhysicsTransform()Create an identity transform.
PhysicsTransform(UnityEngine.Vector2)Create a transformation with the specified translation and no rotation.
PhysicsTransform(UnityEngine.Vector2,UnityEngine.LowLevelPhysics2D.PhysicsRotate)Create a transformation with the specified translation and rotation.

Properties

Property

Description

isValidCheck if the PhysicsTransform is valid (position is not NaN and PhysicsRotate.isValid).

Static Properties

Property

Description

identityThe identity transformation i.e. a transformation with no translation or rotation.

Methods

Method

Description

GetPositionAndRotationGet both the position and rotation.
InverseMultiplyTransformInverse Multiply the specified transform with the current transform.
InverseTransformPointInverse Transform a point using the current transform translation and rotation.
MultiplyTransformMultiply the specified transform with the current transform.
TransformPointTransform a point using the current transform translation and rotation.

Operators

Operator

Description

PhysicsTransformImplicit conversion of a PhysicsRotate that represents a rotation transformation with no translation.