Track Player colliding with world


Is there a way to call a function when the player collides with the World? i.e. Walks into a wall?
The closest thing I can see is ENT.PhysicsCollide; which is (According to the Wiki) only for SENTs.


Entity:GetGroundEntity() == GetWorldEntity() but only works for obviously, the ground.

I think the closest you can get is traces running in a think hook.

Well, the thing is, I’m tryping to implement a more realistic damage system. Someone mentioned that one of the cars gives you damage if you hit a wall, Though I’m not sure where I would find this and use it for my own purpose.

GM:ShouldCollide is called on contact with the world too. Just remember to return true or players will just fall right through

ShouldCollide seems to be called whenever you’re moving INSIDE the world.

GM:ShouldCollide is not called on a collision, it’s polling whether two entities should collide.

I remember someone making something like this. When you collided with something at a high enough force, you would take damage. It was not just fall damage, also damage from e.g. getting launched up and butting your head against the ceiling.

Just use player:GetVelocity and if it changes far too rapidly, then apply damage.