Garry's Mod Wiki

Entity:PhysicsInitSphere

boolean Entity:PhysicsInitSphere( number radius, string physmat )

Description

Makes the physics object of the entity a sphere.

This function will automatically destroy any previous physics objects and call Entity:SetSolid( SOLID_BBOX ) and Entity:SetMoveType( MOVETYPE_VPHYSICS ).
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

1 number radius
The radius of the sphere.
2 string physmat
Physical material from surfaceproperties.txt or added with physenv.AddSurfaceData.

Returns

1 boolean
Returns true on success, false otherwise

Page Links


Special Pages


Wikis

?

Render Time: 33ms

DB GetPage 2
Generate Html 9
SaveChanges (1) 8
Render Body 0
Render Sidebar 12