Difference between revisions of "SetPhysicsEnabled"

From Nomad DB
(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...")
 
 
Line 1: Line 1:
 +
{{Page_WD2}}
 
Enables or disables an entity's physics (for entities that have any type of physics component).
 
Enables or disables an entity's physics (for entities that have any type of physics component).
  

Latest revision as of 20:45, 27 October 2020

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