@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 ​
| Parameter | Type |
|---|---|
options | NetworkTransformOptions |
Returns ​
NetworkTransformComponent
Overrides ​
Properties ​
| Property | Type | Default value | Description | Defined in |
|---|---|---|---|---|
enabled | boolean | true | - | components/Network.ts:53 |
sendRate | number | 20 | Updates per second the owner sends. | components/Network.ts:55 |
interpolationMs | number | 100 | How far in the past others see it, in ms. More is smoother; less is more current. | components/Network.ts:57 |
syncRotation | boolean | true | - | components/Network.ts:58 |
teleportDistance | number | 5 | A jump longer than this (m) snaps instead of sliding, for respawns and teleports. | components/Network.ts:60 |

