Help - Search - Members - Calendar
Full Version: A Formula To Convert Coords To Radians?
BleepingComputer.com > Software > Programming
   
Ryan 3000
Okay, so I have a programming assignment due tomorrow. It's pretty slick, I have a plane that flies around, you can shoot enemies that shoot back. The only source of navigation is an arrow that rotates about the plane, being given a number in radians to turn. So far, all of the algorithms I have used to convert the coordinates of the enemy into radians have failed. Below is a bad visual representation of what I need:




I have the Math class' Sin, Cos, Tan, Asin, Acos, Atan
groovicus
Just a stupid question; can the plane only shoot from the front, or can it shoot in whatever directions, no matter which way it is facing?
Ryan 3000
Sorry to trouble you, got the answer after fiddling around, adding my time to this being about 2 hours to figure this out... Thanks for the quick response.
Alan-LB
This may help in future - http://en.wikipedia.org/wiki/Polar_coordinates

Alan
This is a "lo-fi" version of our main content. To view the full version with more information, formatting and images, please click here.
Invision Power Board © 2001-2008 Invision Power Services, Inc.