Garry's Mod Wiki



Passed as argument of ENTITY:PhysicsCollide, EFFECT:PhysicsCollide and used with Entity:AddCallback.

Sometimes, the value of Speed can be different from getting the length calculated from OurOldVelocity, even though they should be the same, or close to same. It's recommended to do OurOldVelocity:Length() instead.

function ENT:PhysicsCollide( colData, collider ) -- you may get two completely different values, and the second one should be more accurate. print(colData.Speed) print(colData.OurOldVelocity:Length()) end


HitPos [Vector]

The collision position

HitEntity [Entity]

The other collision entity

OurOldVelocity [Vector]

The entity's velocity before the collision

HitObject [PhysObj]

Other entity's physics object

DeltaTime [number]

Time since the last collision with the HitEntity

TheirOldVelocity [Vector]

Speed of the other entity before the collision

Speed [number]

The speed of the entity before the collision

HitNormal [Vector]

Normal of the surface that hit the other entity

PhysObject [PhysObj]

Entity's physics object

OurSurfaceProps [number]

Surface Property ID of this entity

TheirSurfaceProps [number]

Surface Property ID of the entity we collided with

HitSpeed [number]

The scalar speed at which the impact happened

OurNewVelocity [Vector]

Our new velocity after the impact

TheirNewVelocity [Vector]

The new velocity after the impact of the entity we collided with

OurOldAngularVelocity [Vector]

Old angular velocity of this entity

TheirOldAngularVelocity [Vector]

Old angular velocity of the entity we collided with

Page Links

Special Pages



Render Time: 57ms

DB GetPage 5
Generate Html 26
SaveChanges (1) 11
Render Body 0
Render Sidebar 11