Get angle and direction
How do i get the different between my forward angle and the angle between me and my enemy?
[IMG]http://s8.************/uqu2nyuv9/Untitled.png[/IMG] |
Re: Get angle and direction
Code:
#include <sourcemod> |
Re: Get angle and direction
Although I am pretty sure there is already a function for this, why care about the third component of the vectors? According to the diagram a 2d-approximation is sufficient.
|
Re: Get angle and direction
It always give me 1.6 in the different..
Maybe you forget "RadToDeg()". I need it in Degree. Million thanks man.. PHP Code:
EDIT: Quote:
Anyway, my math is very poor.. i dont know what you talking about.. |
Re: Get angle and direction
Quote:
|
Re: Get angle and direction
Quote:
But i will appreciate if it always calculate in Counter Clock Wise (if by mean possible). Easy for me to do the next steps. |
Re: Get angle and direction
there are functions for a lot of things, but i like to optmize things when i can. also, it's just a diagram, it's supposed to be simple. that doesn't exclude the possibility of he wanting it in 3d. well, it's not hard to make it 2d, though.
what do you mean by calculate in counter clock wise? |
Re: Get angle and direction
Nvm.. i dont think its possible..
So may you get the calculation for me then..? |
Re: Get angle and direction
what's not possible and calculate what?
|
Re: Get angle and direction
To calculate the angle result in CCW direction. I mean from 0 degree to 360 degree.. or at least 180 degree.
EDIT: I dont actually know how the degree work so if it cant happen just ignore it.. simply some degree number will fulfill my need.. |
All times are GMT -4. The time now is 04:39. |
Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.