Skip to content

API Variable Interest

github-actions[bot] edited this page Nov 24, 2026 · 1 revision

Variable: Interest

const Interest: object;

Defined in: src/engine/net/interest.ts:40

Interest management on a server World (ADR 0121): connections' groups and viewpoints.

Type Declaration

groups()

groups(connection): readonly string[];

The groups a connection is in.

Parameters

connection

GameObject

Returns

readonly string[]

inGroup()

inGroup(connection, group): boolean;

Whether a connection is in a group.

Parameters

connection

GameObject

group

string

Returns

boolean

isRelevant()

isRelevant(connection, node): boolean;

Whether the ghost node is currently sent to connection (as of the last snapshot).

Parameters

connection

GameObject

node

GameObject

Returns

boolean

join()

join(connection, group): void;

Put a connection in an interest group: ghosts whose Replicated.group is group become relevant to it.

Parameters

connection

GameObject

group

string

Returns

void

leave()

leave(connection, group): void;

Take a connection out of an interest group.

Parameters

connection

GameObject

group

string

Returns

void

setViewer()

setViewer(connection, viewer): void;

The node a connection's relevantDistance is measured from (a camera rig, a spectated player), or null for the default: the root ghosts the connection owns (Replicated.ownerId).

Parameters

connection

GameObject

viewer

GameObject | null

Returns

void

viewer()

viewer(connection): GameObject | null;

The node set with setViewer, or null.

Parameters

connection

GameObject

Returns

GameObject | null

Clone this wiki locally