Table of Contents

Class StandingColliderSync

Namespace
Vintagestory.API.Common.Entities
Assembly
VintagestoryAPI.dll

Synchronizes an entity's standing pose relative to an entity-owned collider. Remote clients resolve the collider's local registration and follow its predicted transform between pose packets. Open in GitHub

public sealed class StandingColliderSync : IRenderer, IDisposable
Inheritance
StandingColliderSync
Implements
Inherited Members
Extension Methods

Constructors

StandingColliderSync(Entity, IRenderer?, bool)

public StandingColliderSync(Entity entity, IRenderer? renderer, bool keepRendererRegistered)

Parameters

entity Entity
renderer IRenderer
keepRendererRegistered bool

True when the owner keeps its renderer registered for its own reasons, such as local player physics.

Fields

AttributeName

public const string AttributeName = "standingCollider"

Field Value

string

Properties

AppliedColliderId

public long AppliedColliderId { get; }

Property Value

long

RenderOrder

0 = drawn first, 1 = drawn last
Default render orders by render stage:
Before:
0 = Ambient Manager
0 = Camera

Opaque:
0.1 = Blue sky (Icosahedron)
0.2 = Night skybox
0.3 = Sun and moon
0.37 = Terrain opaque
0.4 = Enitities
0.5 = Decals
0.5 = Debug wireframe
0.6 = particles
0.7 = Cinematic camera line preview
0.8 = fp held item
0.9 = held item opaque custom renderer

OIT:
0.2 = Frame buffer debug screen
0.35 = Clouds
0.37 = Terrain oit
0.4 = Enitities
0.6 = particles
0.9 = held item oit custom renderer

Shadow far:
0 = shadow map init
0.37 = Terrain shadow far
0.4 = Enitities

Shadow far done:
1 = shadow map finish

Shadow near:
0 = shadow map init
0.37 = Terrain shadow near
0.4 = Enitities

Shadow near done:
1 = shadow map finish
Ortho:
0.2 = Frame buffer debug screen
0.4 = Enitities
0.9 = held item ortho custom renderer
0.95 = sleeping overlay
0.98 = bow/spear aiming reticle
1 = Gui manager
1.02 = crosshair and mouse cursor

AfterFinalComposition:
2 = screenshot

Done:
0.1 = gui manager
2 = screenshot

0.98 = Cinematic camera camera advancing and frame capture when recording
0.99 = Chunk Tesselator Manager (uploads new/modified chunk meshes)
0.999 = Compress chunks scan
1 = video recorder

public double RenderOrder { get; }

Property Value

double

RenderRange

Within what range to the player OnRenderFrame() should be called (currently not used!)

public int RenderRange { get; }

Property Value

int

Methods

ApplyRemotePose(float)

Places a remote entity from its collider-local standing pose. Does nothing until a collider is published for it.

public void ApplyRemotePose(float deltaTime)

Parameters

deltaTime float

Dispose()

Performs application-defined tasks associated with freeing, releasing, or resetting unmanaged resources.

public void Dispose()

GetLocalYaw(ColliderTransform, float)

public static float GetLocalYaw(ColliderTransform transform, float worldYaw)

Parameters

transform ColliderTransform
worldYaw float

Returns

float

GetWorldYaw(ColliderTransform, float)

public static float GetWorldYaw(ColliderTransform transform, float localYaw)

Parameters

transform ColliderTransform
localYaw float

Returns

float

MarkContact()

Records that the entity is standing on a collider owned by an entity, so the server keeps publishing it during the detach grace period.

public void MarkContact()

OnRenderFrame(float, EnumRenderStage)

Called every frame for rendering whatever you need to render

public void OnRenderFrame(float deltaTime, EnumRenderStage stage)

Parameters

deltaTime float
stage EnumRenderStage

Publish(long, string?, double, double, double, float)

Publishes the current standing pose. Pass a zero owner when the entity is not standing on a resolvable entity-owned collider.

public void Publish(long ownerEntityId, string? ownerColliderCode, double localX, double localY, double localZ, float localYaw)

Parameters

ownerEntityId long
ownerColliderCode string
localX double
localY double
localZ double
localYaw float

ReleaseRenderer()

public void ReleaseRenderer()

SetInterpolatedPose(double, double, double, float)

Supplies the absolute pose produced by remote entity interpolation before a standing collider adjusts it.

public void SetInterpolatedPose(double x, double y, double z, float yaw)

Parameters

x double
y double
z double
yaw float