AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Scripting Help (https://forums.alliedmods.net/forumdisplay.php?f=11)
-   -   About angle vectors..... (https://forums.alliedmods.net/showthread.php?t=17915)

Batman/Gorlag 09-11-2005 17:06

About angle vectors.....
 
Okay usually when you look at arrays of size three, and you are using it to set a vector, you know that:

Code:

array[0] = x  //x-coordinate
array[1] = y  //y-coordinate
array[2] = z  //z-coordinate

But now my question is what about angle vectors? You have an array size of three but what do each of the three data store? I know it has something to do with the forward, right, and up angle. But what are the differences between those three and which of the three data stores the forward, right, and up angle? And oh yeah what is the forward, right, and up angle? I figure the right-angle is when you turn your head left and right, and I think up angle is when you look up and down, but I don't know about forward angle. I could be mistaken though.....

Code:

angle[0] =  ?
angle[1] = ?
angle[2] = ?


XxAvalanchexX 09-11-2005 17:28

Re: About angle vectors.....
 
Quote:

Originally Posted by Batman/Gorlag
You have an array size of three but what do each of the three data store?

Rotation on the X axis, rotation on the Y axis, and rotation on the Z axis.

Batman/Gorlag 09-11-2005 17:32

Thanks for clearing that up for me Avalanche. Oh yeah one more question, if I assign an angle vector a positive value, is the positive direction clockwise, or counter-clockwise? Let's just say that I want to set an angle value so that the player is facing left of his current position.

EDIT: Oh yeah when you said Rotation on the x-axis, y-axis, and z-axis, do you mean that those axes are the axes of rotation or something?

XxAvalanchexX 09-11-2005 18:50

I believe angles go from 0.0 to 359.999999, so I'm not sure what setting it to a negative value would do. Probably 359.0 + value.

As for what axis does what, I believe X is front to back rotation, Y is side to side rotation from an above view, and Z is side to side rotation from a front view. I could be wrong though.


All times are GMT -4. The time now is 14:24.

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