Game Development Community

t2dAngleToPoint

by Leonardo Molar · in Torque Game Builder · 09/23/2009 (2:57 am) · 4 replies

Forgive me for being new at this, I have searched the forums, TDN and the documentation for this utility function but for the life of me cannot find any examples on implementation. I know it's new for TGB 1.7 and perhaps is missing documentation? I always get an "Invalid Number of parameters error". I have no access to Torsion and it's intellisense so I'm not entirely sure what parameters are required. I'm pretty sure it's extremely simple. A little help please?

About the author

Recent Threads


#1
09/23/2009 (3:31 am)
You input two points:
%pointA = "0 0";
%pointB = "1 1";
%angle = t2dAngleToPoint( %pointA, %pointB );
Hope that helps!
#2
09/23/2009 (12:37 pm)
Thank you!
#3
12/16/2009 (11:06 pm)
I'm attempting to use this does it return the angle as single numerical value? Such as 45 to represent 45 degrees?
#4
12/17/2009 (12:41 am)
Yep! It returns a result in degrees.