pub struct Transform {
pub m_Children: Vec<PPtr>,
pub m_Father: PPtr,
pub m_GameObject: PPtr,
pub m_LocalPosition: Vector3f,
pub m_LocalRotation: Quaternionf,
pub m_LocalScale: Vector3f,
}Expand description
Transform is a class of the Unity engine since version 3.4.0. Exert from Unity’s scripting documentation: Position, rotation and scale of an object. Every object in a Scene has a Transform.
It’s used to store and manipulate the position, rotation and scale of the object.
Every Transform can have a parent, which allows you to apply position, rotation and scale hierarchically. This is the hierarchy seen in the Hierarchy pane.
They also support enumerators so you can loop through children using: See Also: The component reference, Physics class.
Fields§
§m_Children: Vec<PPtr>Vec<PPtr<Transform>>: (3.4.0 - 2022.3.2f1)
m_Father: PPtrPPtr<Transform>: (3.4.0 - 2022.3.2f1)
m_GameObject: PPtrThe game object this component is attached to. A component is always attached to a game object.
PPtr<GameObject>: (3.4.0 - 2022.3.2f1)
m_LocalPosition: Vector3fPosition of the transform relative to the parent transform.
m_LocalRotation: QuaternionfThe rotation of the transform relative to the transform rotation of the parent.
m_LocalScale: Vector3fThe scale of the transform relative to the GameObjects parent.