Need to make an entity freeze when it hits the wall.

In my tripmine project, I need to make an entity freeze when hitting the worldspawn.

But ENT:Touch won’t work because; “This only works for brush entities and for entities that have Entity:SetTrigger set to true.”

Any idea on how I could check if the entity touches the worldspawn?

Edit: I’m throwing the entity against the wall with a Swep so the physics is moving around a lot. This makes doing a trace difficult.

I don’t know coding but you can try look up at the code of “Battlefield 4 C4”
Maybe that will help you somehow

[editline]3rd November 2016[/editline]

Oops it was Black Ops, rip my reading
Here the link: https://steamcommunity.com/sharedfiles/filedetails/?id=297646940

Thanks i’ll look at it.

Entity:AddCallback

and https://wiki.garrysmod.com/page/Entity_Callbacks

these might be helpful

Why not

ENT:PhysicsCollide?

(and

PhysObj:EnableMotion if you haven’t found it yet)

ent.physicscollide doesn’t work on stuff like prop_physics

based on OP’s wording it sounded like he was pushing around arbitrary physics objects

Seems obvious to me that the tripmine SENT is the entity in question