Skip to content

@relu-interactives/spatial-ecs


@relu-interactives/spatial-ecs / components / NetworkTransformComponent

Class: NetworkTransformComponent ​

Defined in: components/Network.ts:52

Shares an entity's position and rotation. The owner moves it at once and sends updates; everyone else plays them back a little in the past, so movement is smooth however the packets arrive.

Extends ​

Constructors ​

Constructor ​

ts
new NetworkTransformComponent(options?): NetworkTransformComponent;

Defined in: components/Network.ts:62

Parameters ​

ParameterType
optionsNetworkTransformOptions

Returns ​

NetworkTransformComponent

Overrides ​

Component.constructor

Properties ​

PropertyTypeDefault valueDescriptionDefined in
enabledbooleantrue-components/Network.ts:53
sendRatenumber20Updates per second the owner sends.components/Network.ts:55
interpolationMsnumber100How far in the past others see it, in ms. More is smoother; less is more current.components/Network.ts:57
syncRotationbooleantrue-components/Network.ts:58
teleportDistancenumber5A jump longer than this (m) snaps instead of sliding, for respawns and teleports.components/Network.ts:60