Skip to content

REVO / API version 0.0.10

Object

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

new Object(model, position, rotation?, dynamic?): Object

Parameter Type Description
model string | number Model name (ASCII case-insensitive) or unsigned 32-bit hash.
position IVector3 -
rotation? number | IVector3 | IQuaternion Heading or XYZ Euler angles in radians, or a unit quaternion. Defaults to zero heading.
dynamic? boolean -

Object

Physical.constructor

Property Type Details
alpha number —
collisionEnabled boolean Inherited from Physical.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 Physical.dimension
health number Inherited from Physical.health
id
readonly
number Inherited from Physical.id
lodDistance
readonly
number —
netOwner
readonly
Player | null —
networkId
readonly
number | null Network ID shared with clients. null after destruction.

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

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

Inherited from Physical.rot
velocity Read: Vector3
Write: IVector3
Inherited from Physical.velocity

activatePhysics(): boolean

boolean


deleteSyncedMeta(key): void

Parameter Type
key string

void

Physical.deleteSyncedMeta


destroy(): void

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

void

Physical.destroy


getObservers(): readonly Player[]

readonly Player[]

Physical.getObservers


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

Type Parameter
K extends never
Parameter Type
key K

ICustomBaseSyncedMeta[K] | undefined

Physical.getSyncedMeta

getSyncedMeta<T>(key): T | undefined

Type Parameter Default type
T TransportValue
Parameter Type
key string

T | undefined

Physical.getSyncedMeta


getSyncedMetaKeys(): string[]

string[]

Physical.getSyncedMetaKeys


hasSyncedMeta(key): boolean

Parameter Type
key string

boolean

Physical.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

Physical.setSyncedMeta

setSyncedMeta(values): void

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

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

void

Physical.setSyncedMeta


static getById(id): Object | null

Parameter Type
id number

Object | null

Physical.getById


static getByNetworkId(networkId): Object | null

Parameter Type
networkId number

Object | null

Physical.getByNetworkId


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

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 Object[]

Physical.getInRadius

Moving entities and attaching props