View more

View more

View more

Image of the Day Submit

IOTD | Top Screenshots

The latest, straight to your Inbox.

Subscribe to GameDev.net Direct to receive the latest updates and exclusive content.

angles

Old topic!

Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.

#1Toast  Members

Posted 27 June 2001 - 11:53 AM

how do you find the angle (in radians) between 2 points? given the coordinates of the two points

Posted 27 June 2001 - 12:26 PM

You must mean angle formed by point-origin-point? use the dot product. for point a and point b. |a| means length from origin to a.

|a| * |b| * cos(angle) = (ax*bx)+(ay*by)+(az*bz)

those are the 2 different ways to write the dot product. if you have the x,y,z coordinates of the point you can find the length and solve for angle

Old topic!

Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.