Entity/PhysicsInitShadow

From Garry's Mod
(Difference between revisions)
Jump to: navigation, search
(Bug)
 
Line 1: Line 1:
 
{{Func
 
{{Func
|Name=PhysicsInitShadow
 
|Parent=Entity
 
 
|Description=Initializes the entity's physics object as a physics shadow. Removes the previous physics object if successful. This is used internally for the Player's and NPC's physics object, and certain HL2 entities such as the crane.
 
|Description=Initializes the entity's physics object as a physics shadow. Removes the previous physics object if successful. This is used internally for the Player's and NPC's physics object, and certain HL2 entities such as the crane.
  
 
A physics shadow can be used to have static entities that never move by setting both arguments to false.
 
A physics shadow can be used to have static entities that never move by setting both arguments to false.
  
{{Bug|Clientside physics objects are broken and do not move properly. Physics objects should only created on the server or you will experience incorrect physgun beam position and prediction issues.}}
+
{{Bug|Clientside physics objects are broken and do not move properly in some cases. Physics objects should only created on the server or you will experience incorrect physgun beam position, prediction issues, and other unexpected behavior.}}
 
|Realm=Shared
 
|Realm=Shared
 
|IsClass=Yes
 
|IsClass=Yes

Latest revision as of 23:14, 4 October 2018

 Entity:PhysicsInitShadow( )

Contents

Description

Initializes the entity's physics object as a physics shadow. Removes the previous physics object if successful. This is used internally for the Player's and NPC's physics object, and certain HL2 entities such as the crane.

A physics shadow can be used to have static entities that never move by setting both arguments to false.

BUG

Clientside physics objects are broken and do not move properly in some cases. Physics objects should only created on the server or you will experience incorrect physgun beam position, prediction issues, and other unexpected behavior.

Arguments

boolean allowPhysicsMovement=true

Whether to allow the physics shadow to move under stress.

Arguments

boolean allowPhysicsRotation=true

Whether to allow the physics shadow to rotate under stress.

Returns

boolean

Return true on success, nil otherwise.
Personal tools
Navigation