Class WorldSpatial
- Namespace
- Shard.Gameplay.World
- Assembly
- Shard.Gameplay.World.dll
Queues transform and parenting changes for the World’s Reconcile phase.
public sealed class WorldSpatial
- Inheritance
-
WorldSpatial
- Inherited Members
Remarks
Submit on the owning World thread. Entities are borrowed only during submission; returned tasks complete after reconciliation and must be awaited outside the synchronous callback.
Methods
DetachAsync(Entity)
Removes active or pending parenting while preserving the resolved World pose.
public Task DetachAsync(Entity child)
Parameters
childEntity
Returns
ReparentAsync(Entity, Entity, SpatialReparentMode, LocalTransform?, SpatialParentLossPolicy)
Changes coordinate parent using an explicit choice of which transform to preserve.
public Task ReparentAsync(Entity child, Entity parent, SpatialReparentMode mode, LocalTransform? localTransform, SpatialParentLossPolicy parentLossPolicy)
Parameters
childEntityparentEntitymodeSpatialReparentModelocalTransformLocalTransform?parentLossPolicySpatialParentLossPolicy
Returns
ResolvePendingParentAsync(Entity)
Resolves a pending child against its stored stable parent and local pose.
public Task ResolvePendingParentAsync(Entity child)
Parameters
childEntity
Returns
SetLocalTransformAsync(Entity, LocalTransform)
Replaces the authoritative local pose of an active spatial child.
public Task SetLocalTransformAsync(Entity child, LocalTransform transform)
Parameters
childEntitytransformLocalTransform
Returns
SetWorldTransformAsync(Entity, Transform)
Replaces the authoritative World pose of an unparented entity.
public Task SetWorldTransformAsync(Entity entity, Transform transform)
Parameters
entityEntitytransformTransform