[Question] Get angle XYZ between points
#4

Quote:
Originally Posted by iggy1
Посмотреть сообщение
The link in my sig has working example (arrow.inc)
Thank you very much what you have written to me.
I found the right formula for your arrow.inc. The result was he was looking for. Method found. Decided:
PHP код:
stock Float:GetAngleYFromPoints(Float:p1[3], Float:p2[3]) {
    
p1[0] -= p2[0]; //x
    
p1[1] -= p2[1]; //y
    
return (360.0 atan((p1[2]-p2[2])/floatsqroot(p1[0]*p1[0]+p1[1]*p1[1])));

Thanks!
Reply


Messages In This Thread
[Question] Get angle XYZ between points - by Logofero - 16.05.2015, 08:43
Re: [Question] Get angle XYZ between points - by iggy1 - 16.05.2015, 08:59
Re: [Question] Get angle XYZ between points - by Logofero - 16.05.2015, 09:32
Re: [Question] Get angle XYZ between points - by Logofero - 16.05.2015, 10:24

Forum Jump:


Users browsing this thread: 1 Guest(s)