SetPhysicsEnabled

From Nomad DB

Enables or disables an entity's physics (for entities that have any type of physics component).

Syntax

SetPhysicsEnabled(targetEntityId, enabled)
  • targetEntityId (string): ID of the entity to set the physics state of
  • enabled (number): Physics state to set (0 = disabled, 1 = enabled)

Example

Disables the local player's physics.

SetPhysicsEnabled(GetLocalPlayerEntityId(), 0)

Related Pages