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...")
(No difference)

Revision as of 20:09, 16 April 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