Hosting and domain costs until October 2024 have been generously sponsored by dumptruck_ds. Thank you!
Difference between revisions of "DP MOVETYPEFOLLOW"
From Quake Wiki
(New page: .movetype definitions: <pre> float MOVETYPE_FOLLOW = 12; </pre> MOVETYPE_FOLLOW implemented, this uses existing entity fields in unusual ways: * aiment - the entity this is attached to. *...) |
|||
Line 19: | Line 19: | ||
hole.v_angle = hole.angles - bmodel.angles; // relative angles | hole.v_angle = hole.angles - bmodel.angles; // relative angles | ||
</pre> | </pre> | ||
+ | [[Category:DarkPlaces]] |
Latest revision as of 02:14, 25 March 2013
.movetype definitions:
float MOVETYPE_FOLLOW = 12;
MOVETYPE_FOLLOW implemented, this uses existing entity fields in unusual ways:
- aiment - the entity this is attached to.
- punchangle - the original angles when the follow began.
- view_ofs - the relative origin (note that this is un-rotated by punchangle, and that is actually the only purpose of punchangle).
- v_angle - the relative angles.
Here's an example of how you would set a bullet hole sprite to follow a bmodel it was created on, even if the bmodel rotates:
hole.movetype = MOVETYPE_FOLLOW; // make the hole follow hole.solid = SOLID_NOT; // MOVETYPE_FOLLOW is always non-solid hole.aiment = bmodel; // make the hole follow bmodel hole.punchangle = bmodel.angles; // the original angles of bmodel hole.view_ofs = hole.origin - bmodel.origin; // relative origin hole.v_angle = hole.angles - bmodel.angles; // relative angles