Skip to content

TransformComponent Class

Definition

Namespace: Brine2D.ECS.Components

Position, rotation, and scale for an entity. World-space accessors \([Position](Position.md 'Brine2D\.ECS\.Components\.TransformComponent\.Position'), [Rotation](Rotation.md 'Brine2D\.ECS\.Components\.TransformComponent\.Rotation'), [Scale](Scale.md 'Brine2D\.ECS\.Components\.TransformComponent\.Scale')\) walk the parent hierarchy automatically; local-space accessors bypass it.

C#
public class TransformComponent : Brine2D.ECS.Component

Inheritance System.ObjectComponent → TransformComponent

Properties
Position World-space position. Setting this back-computes Brine2D.ECS.Components.TransformComponent.LocalPosition through the parent's transform \(rotation \+ scale\).
Rotation World-space rotation in radians. Additive through the parent hierarchy.
Scale World-space scale. Multiplicative through the parent hierarchy.
Methods
GetTransformMatrix() Computes the world-space SRT matrix. Walks the parent hierarchy via Position/Rotation/Scale.