Question about firing a entity and having it stick in what ever it hits?
4 replies, posted
how would one make their custom entity that they fire from a gun stick to what ever it hits like say a wall or a player, etc
In the entity's Touch method, store the local position it is at on the object and maintain it in a Think hook.
Why not use Entity:SetParent(target)
[QUOTE=MrManiak;52378457]Why not use Entity:SetParent(target)[/QUOTE]
You can do that too; the entity loses it's own physics, though.
It's more difficult for players. I once made a mod for placing proximity mines or c4 on people - it would stay exactly where you placed it. Back then I couldn't get the relative angle to the parent bone to orient properly, but I believe it can be done with some of the world to local functions too.
Sticking to an entity is super easy. Thanks to welding.
Sorry, you need to Log In to post a reply to this thread.