Scripting API

Scripting API

GlobalTransform

Struct in Abyss.Core, from Abyss.Core.

Where an entity is in world space — as an affine matrix, which is not the same shape as Transform.

public struct GlobalTransform

Remarks

Bevy stores this as Affine3A: three basis vectors and a translation, 64 bytes aligned to 16. Composing a hierarchy that way is cheaper than composing translation, rotation and scale separately, and it is the shape the renderer wants — but it means a world-space rotation is not a field anybody can read. Recovering one is a matrix decomposition, which the engine does not do for you yet. World position is still a field, and is usually the part gameplay wants.

Written by Bevy's propagation in its PostUpdate; read it, do not write it. Each lane holds three meaningful floats and a fourth that is padding — Vec3A is a SIMD register — so read the axes through their components rather than assuming the fourth means anything.

Properties

TranslationX

public readonly float TranslationX { get; }

World-space position, x.

TranslationY

public readonly float TranslationY { get; }

World-space position, y.

TranslationZ

public readonly float TranslationZ { get; }

World-space position, z.

Fields

AxisX

public Vector128<float> AxisX

The matrix's x basis vector: rotation and scale, x column. Fourth lane is padding.

AxisY

public Vector128<float> AxisY

The matrix's y basis vector. Fourth lane is padding.

AxisZ

public Vector128<float> AxisZ

The matrix's z basis vector. Fourth lane is padding.

Translation

public Vector128<float> Translation

World-space position. Fourth lane is padding.