Hosting and domain costs until October 2024 have been generously sponsored by dumptruck_ds. Thank you!
DP GFX QUAKE3MODELTAGS
From Quake Wiki
Field definitions:
.entity tag_entity; // Entity this is attached to (call setattachment to set this) .float tag_index; // Which tag on that entity (0 is relative to the entity, > 0 // is an index into the tags on the model if it has any) //(call setattachment to set this)
Builtin definitions:
// Attachs e to a tag on tagentity (note: use "" to attach to entity origin/angles // instead of a tag) void(entity e, entity tagentity, string tagname) setattachment = #443;
Allows entities to be visually attached to model tags (which follow animations perfectly) on other entities, for example attaching a weapon to a player's hand, or upper body attached to lower body, allowing it to change angles and frame separately.
Note:
- origin and angles are relative to the tag, use '0 0 0' for both if you want it to follow exactly, this is similar to viewmodelforclient's behavior).
- If the tag is not found, it defaults to "" (attach to origin/angles of entity)
- Attaching to world turns off attachment
- The entity that this is attached to must be visible for this to work
- If an entity is attached to the player entity it will not be drawn in first person.