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 6 days ago

Definition

  • Type: Struct
  • Namespace: Unity.U2D.Physics
  • Assembly: UnityEngine.PhysicsCore2DModule
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,Unity.U2D.Physics.PhysicsRotate)Create a transformation with the specified translation and rotation.

Properties

Property

Description

isValidCheck if the PhysicsTransform is valid (position is not NaN and _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.