SetPhysicsEnabled

From Nomad DB
Revision as of 20:09, 16 April 2020 by Cobra (talk | contribs) (Created page with "Enables or disables an entity's physics (for entities that have any type of physics component). == Syntax == <syntaxhighlight lang="lua"> SetPhysicsEnabled(targetEntityId, en...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)

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