How to get the position of a View Model Attachment? Created 3 years ago2021-03-20 15:31:23 UTC by The Mighty Goglu. The Mighty Goglu.

Created 3 years ago2021-03-20 15:31:23 UTC by The Mighty Goglu. The Mighty Goglu.

Posted 3 years ago2021-03-20 15:31:23 UTC Post #345460
I have no clue of how to get that position I find nothing on it anywhere (but as always I may search not well).
Posted 3 years ago2021-03-21 10:26:08 UTC Post #345461
On the server side CBaseAnimating::GetAttachment should work. On the client side it's complicated because attachment positions are cached in cl_entity_t::attachments and get updated once per frame at a specific time. Depending on when you access that the values will either be outdated, set to the viewmodel origin or to their correct values.
Posted 3 years ago2021-03-24 14:22:11 UTC Post #345479
Thanks a lot :)
You must be logged in to post a response.