Garry's Mod Wiki


ENTITY:PhysicsCollide( table colData, PhysObj collider )


Called when the entity collides with anything. The move type and solid type must be VPHYSICS for the hook to be called.

If you want to use this hook on default/engine/non-Lua entites ( like prop_physics ), use Entity:AddCallback instead! This page describes a hook for Lua entities


1 table colData
Information regarding the collision. See Structures/CollisionData.
2 PhysObj collider
The physics object that collided.


Play a sound when we hit something.

function ENT:PhysicsCollide( data, phys ) if ( data.Speed > 50 ) then self:EmitSound( Sound( "Flashbang.Bounce" ) ) end end

Page Links

Special Pages



Render Time: 58ms

DB GetPage 10
Generate Html 9
SaveChanges (1) 25
Render Body 0
Render Sidebar 11