Attachements

Hello, I want to make something like a gun model on players back. I wonder, what’s the best way to do it? I could use **[Entity.GetBonePosition

http://wiki.garrysmod.com/favicon.ico](http://wiki.garrysmod.com/?title=Entity.GetBonePosition)** and set attached weapons ang and pos each frame, but maybe there is a better way, to make engine to do it itself?

Go with setting the position and angle each frame.
Even if there’s an engine function for it I bet it’ll do essentially the same thing.

Alright, thanks.
/thread

Correct me if i’m wrong but wouldn’t it be better to parent the model to the player so you don’t have to update it’s position every frame?

That would work but I dont think that would update the angle correctly. IIRC, Parenting only changes position.

Parenting does the same only it does the math for you.