Skip to content

REVO / API version 0.0.10

Physical

Getters return zero values while the entity is streamed out.

Property Type Details
dimension
readonly
number World ID, default 0. Writable on local objects created by this resource. The server controls other objects. globalDimension makes the object visible in every numbered world.

Inherited from Entity.dimension
heading number Heading in radians.

Inherited from Entity.heading
health number Implements IPhysical.health
id
readonly
number Local ID, assigned independently on the client and server.

Implements IPhysical.id

Inherited from Entity.id
isLocallySimulated
readonly
boolean Simulation authority does not grant permission to change server-owned state.

Inherited from Entity.isLocallySimulated
isNetworked
readonly
boolean Inherited from Entity.isNetworked
isStreamedIn
readonly
boolean Inherited from Entity.isStreamedIn
maxHealth number —
netOwner
readonly
Player | null Inherited from Entity.netOwner
networkId
readonly
number | null Server-assigned network ID, or null without replication. Separate from id.

Inherited from Entity.networkId
ready
readonly
boolean The initial server state has been applied, or a client-only entity has streamed in.

Inherited from Entity.ready
scriptID
readonly
number GTA handle, or 0 while not streamed in. Do not retain it across frames.

Inherited from Entity.scriptID
streamDistance number | null Per-object distance in metres. null uses the streamer’s default.

Inherited from Entity.streamDistance
streamingEnabled boolean Enables automatic streaming. Disabling it preserves the current streaming state. A dimension mismatch still suspends it until its dimension is visible again.

Inherited from Entity.streamingEnabled
type
readonly
BaseType Inherited from Entity.type
valid
readonly
boolean Inherited from Entity.valid
all
static readonly
readonly Physical[] Overrides Entity.all
count
static readonly
number Overrides Entity.count
Accessor Type Details
angVelocity Read: Vector3
Write: IVector3
Angular velocity in radians per second.
modelHash
readonly
number Implements IPhysical.modelHash

Inherited from Entity.modelHash
pos Read: Vector3
Write: IVector3
Implements IPhysical.pos

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
Implements IPhysical.velocity

activatePhysics(): void

void


destroy(): void

Deletes an entity created by this resource. Throws if the entity is networked, belongs to another resource, has been destroyed, or cannot be removed from GTA.

void

Entity.destroy


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

Returns a copy. Client-only objects have no synced metadata.

Type Parameter
K extends never
Parameter Type
key K

ICustomBaseSyncedMeta[K] | undefined

Entity.getSyncedMeta

getSyncedMeta<T>(key): T | undefined

Returns a copy. Client-only objects have no synced metadata.

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


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 getByScriptId(scriptID): Physical | null

Parameter Type
scriptID number

Physical | null

Entity.getByScriptId

Health and damage