Hosting and domain costs until October 2024 have been generously sponsored by dumptruck_ds. Thank you!
Editing makevectors
From Quake Wiki
Warning: You are not logged in. Your IP address will be publicly visible if you make any edits. If you log in or create an account, your edits will be attributed to your username, along with other benefits.
The edit can be undone.
Please check the comparison below to verify that this is what you want to do, and then save the changes below to finish undoing the edit.
Latest revision | Your text | ||
Line 2: | Line 2: | ||
== Usage == | == Usage == | ||
− | Takes the passed angles and converts them into its three local axes i.e. its 3D rotation matrix. | + | Takes the passed angles and converts them into its three local axes i.e. its 3D rotation matrix. These axes are stored in the '''v_forward''', '''v_right''', and '''v_up''' globals. '''v_forward''' points in the direction of the angles, '''v_right''' points 90 degrees to the right of '''v_forward''', and '''v_up''' points 90 degrees above '''v_forward'''. This is useful if you need to offset relative to an angle e.g. in the direction an entity is facing. |
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
'''Warning:''' A bug exists with <code>vectoangles()</code> where the pitch is not negated correctly. If you pass the results of this function or the '''angles''' field of an entity, the pitch (the x value) must be negated first. | '''Warning:''' A bug exists with <code>vectoangles()</code> where the pitch is not negated correctly. If you pass the results of this function or the '''angles''' field of an entity, the pitch (the x value) must be negated first. |