Transform

Inherits from Component

A Transform object is used to store the position, rotation and scale of a GameObject.

Properites
  • Position - The world position of the Transform.
  • X - The world X position of the Transform.
  • Y - The world Y position of the Transform.
  • LocalPosition - Position of this Transform relative to its parent Transform.
  • LocalX - X Position of this Transform relative to its parent Transform.
  • LocalY - Y Position of this Transform relative to its parent Transform.
  • Rotation - The rotation of this Transform in degrees.
  • LocalRotation - The rotation of this Transform in degrees relative to its parent Transform.
  • RotationRadians - The rotation of this Transform in radians.
  • LocalRotationRadians - The rotation of this Transform in radians relative to its parent Transform.
  • Size - Gets or sets the size of this Transform.
  • ScaledSize - Gets the size of this Transform after having its scale applied.
  • Scale - The scale of this Transform.
  • LocalScale - The scale of this Transform relative to its parent Transform
  • BoundingBox - Gets the current bounding box of the Transform (not accounting for rotation)
  • Children - A list of all children currently attached to this Transform.
  • Velocity - The velocity of the Transform.
  • VelocityX - The X velocity of the Transform.
  • VelocityY - The Y velocity of the Transform.
  • Acceleration - The acceleration of the Transform.
  • AccelerationX - The X acceleration of the Transform.
  • AccelerationY - The Y acceleration of the Transform.
  • Parent - Get or set this Transforms parent.
  • Root - The Transform at the root of the hierarchy.
  • ChildCount - The count of how many children are currently attached to this Transform.

Constructors
  • Transform - Creates a new instance of a Transform component.

Public Methods
  • Update - Updates this Transform.
  • Translate - Moves the Transform in the direction and distance of translation.
  • Rotate - Rotates the Transform by the passed in value in degrees.
  • RotateRadians - Rotates the Transform by the passed in value in radians.
  • LookAt - Rotates the Transform so that it faces the location vector.
  • LookAway - Rotates the Transform so that it faces away from the location vector.
  • DetachChildren - Unparents all children from this Transform.
  • DetachFromParent - Unparents this Transform from its parent.
  • AddChild - Adds a child to this Transform.
  • RemoveChild - Removes a child from this Transform.
  • Find - Finds a child by name and returns it.
  • IsChildOf - Is this Transform a direct child of another Transform.

Last edited Mar 27, 2010 at 2:36 PM by MonkeyDeadStudios, version 1

Comments

No comments yet.