Namespace Unity.Transforms | Package Manager UI website
docs.unity3d.com
    Show / Hide Table of Contents

    Namespace Unity.Transforms

    Classes

    CopyInitialTransformFromGameObjectComponent

    CopyInitialTransformFromGameObjectSystem

    CopyTransformFromGameObjectComponent

    CopyTransformFromGameObjectSystem

    CopyTransformToGameObjectComponent

    CopyTransformToGameObjectSystem

    HeadingComponent

    HeadingSystem

    LocalHeadingComponent

    LocalPositionComponent

    LocalRotationComponent

    MoveForwardComponent

    MoveForwardSystem

    MoveSpeedComponent

    PositionComponent

    RotationComponent

    TransformInputBarrier

    TransformMatrixComponent

    TransformParentComponent

    TransformSystem

    Structs

    CopyInitialTransformFromGameObject

    Copy Transform from GameObject associated with Entity to TransformMatrix. Once only. Component is removed after copy.

    CopyTransformFromGameObject

    Copy Transform from GameObject associated with Entity to TransformMatrix.

    CopyTransformToGameObject

    Copy Transform to GameObject associated with Entity from TransformMatrix.

    Heading

    LocalHeading

    LocalPosition

    User specified position in local space.

    1. If a TransformParent exists, the object to world matrix will be determined by the parent's transform. Otherwise, it will be a Unit matrix.
    2. If a TransformMatrix exists, the calculated world position will be stored as the translation in that matrix.
    3. If a Position exists, the calculated world position will be stored in that component data.
    4. If TransformParent refers to the entity this component is associated with, the calculated world position will be used as the translation in the object to world matrix for the entity associated with this component, regardless of if it is stored in a TransformMatrix.

    LocalRotation

    User specified rotation in local space.

    1. If a TransformParent exists, the object to world matrix will be determined by the parent's transform. Otherwise, it will be a Unit matrix.
    2. If a TransformMatrix exists, the calculated world rortation will be stored as the rotation part of that matrix.
    3. If a Rotation exists, the calculated world rotation will be stored in that component data.
    4. If TransformParent refers to the entity this component is associated with, the calculated world rotation will be used as the rotation part in the object to world matrix for the entity associated with this component, regardless of if it is stored in a TransformMatrix.

    MoveForward

    MoveSpeed

    Store float speed. This component requests that if another component is moving the PositionComponent it should respect this value and move the position at the constant speed specified.

    Position

    User specified (or calculated) World position

    1. If a TransformParent exists and no LocalPosition exists, the value will be used as the object to World translation irrespective of the parent object to World matrix.
    2. If a TransformParent exists and a LocalPosition exists, the calculated World position will be stored in this value by the TransformSystem.
    3. If a TransformMatrix exists, the value will be stored as the translation part of the matrix.

    Rotation

    User specified (or calculated) world rotation

    1. If a TransformParent exists and no LocalRotation exists, the value will be used as the object to world translation irrespective of the parent object to world matrix.
    2. If a TransformParent exists and a LocalRotation exists, the calculated world rotation will be stored in this value by the TransformSystem.
    3. If a TrasformMatrix exists, the value will be stored as the rotation part of the matrix.

    TransformMatrix

    Store a (calculated) float4x4 matrix representing the Object to World position/rotation/scale transformation. Required by other systems. e.g. MeshInstanceRenderer

    TransformParent

    User assigned parent Entity. Local transformations (e.g. LocalPosition, LocalRotation) will be relative to the object to world matrix associated with the parent entity. The parent's object to world matrix may only be temporary if it's not explicitly stored in a TransformMatrix.

    Back to top
    Copyright © 2023 Unity Technologies — Terms of use
    • Legal
    • Privacy Policy
    • Cookies
    • Do Not Sell or Share My Personal Information
    • Your Privacy Choices (Cookie Settings)
    "Unity", Unity logos, and other Unity trademarks are trademarks or registered trademarks of Unity Technologies or its affiliates in the U.S. and elsewhere (more info here). Other names or brands are trademarks of their respective owners.
    Generated by DocFX on 18 October 2023