Entity/PhysicsInitSphere

From Garry's Mod
Jump to: navigation, search
 Entity:PhysicsInitSphere( )

Contents

Description

Makes the physics object of the entity a sphere.

NOTE

This function will automatically destroy any previous physics objects and call Entity:SetSolid( SOLID_BBOX ) and Entity:SetMoveType( MOVETYPE_VPHYSICS ).

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

number radius

The radius of the sphere.

Arguments

string physmat

Physical material from surfaceproperties.txt or added with physenv.AddSurfaceData.

Returns

boolean

Returns true on success, false otherwise
Personal tools
Navigation