To make a hat stick to the player's head I'm using MOVETYPE_FOLLOW, which kind of works now, but not for what I'm going to do.
I've added a set of additional animations to the player's model, which don't change the player's origin (such as dancing; the model moves a few inches forward but the actual hitbox remains on the same spot).
The question is - is there a way to attach the hat entity directly to the bone, which is:
Quote:
|
Originally Posted by http://wiki.amxmodx.org/FakeMeta_Functions_Detailed_Descriptions#EngF unc_GetBonePosition
Bone 8 Name: "Bip01 Head"
|
Now I could probably get the attachment's origin with EngFunc_GetBonePosition and keep changing the hat's origin to it in PreThink, but as we all know that's pretty laggy unless on LAN server and doesn't look very great.
Creating a beam allows to select an attachment it will stick to in the message, but I haven't found a way to do this with an entity.
https://forums.alliedmods.net/archiv...p/t-59595.html
Thanks in advance.