angle_vector
|
Re: angle_vector
NOBODY KNOWS
but it broke in 1.75 for a few days. |
Re: angle_vector
Quote:
|
Re: angle_vector
Given an array of angles around each axis (this is how the HL engine represents rotation, for example of players), it gives you a normalized vector pointing to that direction.
For example if you want to move the player 20 units to the direction where he is looking, you'd do: 1) get his "angles" entvar (or was it v_angle? no idea) using some function. 2) use anglevectors with the returned angles as a parameter to get the "forward vector" 3) multiply that vector by 20.0 4) add that vector to the player's origin And you're done. Anglevectors is capable of giving you the "forward" vector, the "up" vector, and the "right" vector. This way you can also implement strafe-like movements and such. |
Re: angle_vector
whoa... thats nice. I wish I knew about that for a few plugins I was writing. I was trying to do that insane vector math myself and it was not fun.
|
Re: angle_vector
Quote:
I guess that allows me to rewrite one of the things I never perfected. |
Re: angle_vector
lol, I recently did the math for that for a function in my chr_engine file :P
|
Re: angle_vector
All of you probably have used velocity_by_aim function which simply multiplies player's anglevectors. Curious to observe when coders who have a certain expirience discovers simple things like that.
|
| All times are GMT -4. The time now is 08:02. |
Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.