Raised This Month: $ Target: $400
 0% 

angle_vector


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
GHW_Chronic
SourceMod Donor
Join Date: Sep 2004
Location: Texas
Old 07-05-2006 , 03:11   angle_vector
Reply With Quote #1

http://www.amxmodx.org/funcwiki.php?go=func&id=366

what does it do?
GHW_Chronic is offline
Send a message via AIM to GHW_Chronic
BAILOPAN
Join Date: Jan 2004
Old 07-05-2006 , 04:57   Re: angle_vector
Reply With Quote #2

NOBODY KNOWS

but it broke in 1.75 for a few days.
__________________
egg
BAILOPAN is offline
Hawk552
AMX Mod X Moderator
Join Date: Aug 2005
Old 07-05-2006 , 11:09   Re: angle_vector
Reply With Quote #3

Quote:
Originally Posted by BAILOPAN
NOBODY KNOWS

but it broke in 1.75 for a few days.
it collects data about the surrounding environment, then discards it and drives into walls
__________________
Hawk552 is offline
Send a message via AIM to Hawk552
PM
hello, i am pm
Join Date: Jan 2004
Location: Canalization
Old 07-05-2006 , 12:06   Re: angle_vector
Reply With Quote #4

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.
__________________
hello, i am pm
PM is offline
Hawk552
AMX Mod X Moderator
Join Date: Aug 2005
Old 07-05-2006 , 18:02   Re: angle_vector
Reply With Quote #5

Quote:
Originally Posted by PM
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.
Yeah, wow, that information is really useful for me too.

I guess that allows me to rewrite one of the things I never perfected.
__________________
Hawk552 is offline
Send a message via AIM to Hawk552
GHW_Chronic
SourceMod Donor
Join Date: Sep 2004
Location: Texas
Old 07-05-2006 , 20:23   Re: angle_vector
Reply With Quote #6

lol, I recently did the math for that for a function in my chr_engine file
GHW_Chronic is offline
Send a message via AIM to GHW_Chronic
jtp10181
Veteran Member
Join Date: May 2004
Location: Madison, WI
Old 07-05-2006 , 17:59   Re: angle_vector
Reply With Quote #7

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.
__________________
jtp10181 is offline
Send a message via ICQ to jtp10181 Send a message via AIM to jtp10181 Send a message via MSN to jtp10181 Send a message via Yahoo to jtp10181
Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -4. The time now is 08:02.


Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.
Theme made by Freecode