Skip to content

REVO / API version 0.0.10

Physical

Position and rotation getters return copies. Assign a new value to apply changes.

Property Type Details
collisionEnabled boolean Inherited from Entity.collisionEnabled
dimension number Dimension: 0..4294967294, default 0. globalDimension shows entities and spatial audio in every dimension. Players cannot use globalDimension. Global entities share movement, damage and seats across dimensions. A vehicle’s trailer follows its dimension. Occupants follow unless the new dimension is global.

Inherited from Entity.dimension
health number —
id
readonly
number Inherited from Entity.id
networkId
readonly
number | null Network ID shared with clients. null after destruction.

Inherited from Entity.networkId
type
readonly
BaseType Inherited from Entity.type
valid
readonly
boolean Inherited from Entity.valid
visible boolean Inherited from Entity.visible
all
static readonly
readonly Physical[] Overrides Entity.all
count
static readonly
number Overrides Entity.count
Accessor Type Details
angVelocity Read: Vector3
Write: IVector3
—
modelHash Read: number
Write: string | number
Accepts a model name or nonzero uint32 hash. Clients load the new model asynchronously.

Inherited from Entity.modelHash
pos Read: Vector3
Write: IVector3
Inherited from Entity.pos
quaternion Read: Quaternion
Write: IQuaternion
Inherited from Entity.quaternion
rot Read: Vector3
Write: IVector3
Euler angles in radians, applied X, then Y, then Z.

Inherited from Entity.rot
velocity Read: Vector3
Write: IVector3
—

deleteSyncedMeta(key): void

Parameter Type
key string

void

Entity.deleteSyncedMeta


destroy(): void

Deletes the entity. Throws for players and already destroyed entities.

void

Entity.destroy


getObservers(): readonly Player[]

readonly Player[]

Entity.getObservers


getSyncedMeta<K>(key): ICustomBaseSyncedMeta[K] | undefined

Type Parameter
K extends never
Parameter Type
key K

ICustomBaseSyncedMeta[K] | undefined

Entity.getSyncedMeta

getSyncedMeta<T>(key): T | undefined

Type Parameter Default type
T TransportValue
Parameter Type
key string

T | undefined

Entity.getSyncedMeta


getSyncedMetaKeys(): string[]

string[]

Entity.getSyncedMetaKeys


hasSyncedMeta(key): boolean

Parameter Type
key string

boolean

Entity.hasSyncedMeta


setSyncedMeta<K>(key, value): void

Copies and replicates the value to the object’s audience. Player metadata also goes to that player.

Type Parameter
K extends string
Parameter Type
key K
value K extends never ? ICustomBaseSyncedMeta[K] : TransportValue

void

Entity.setSyncedMeta

setSyncedMeta(values): void

Atomically merges own enumerable fields. Unsupported values reject the entire batch.

Parameter Type
values Partial<ICustomBaseSyncedMeta> & Record<string, TransportValue>

void

Entity.setSyncedMeta


static getById(id): Physical | null

Parameter Type
id number

Physical | null

Entity.getById


static getByNetworkId(networkId): Physical | null

Parameter Type
networkId number

Physical | null

Entity.getByNetworkId


static getInRadius(position, radius, dimension?): readonly Physical[]

Includes global entities alongside the selected dimension. globalDimension selects only global entities. Omit it to search all worlds.

Parameter Type
position IVector3
radius number
dimension? number

readonly Physical[]

Entity.getInRadius

Health and damage