   Calculating next location
  By taking in current location in X,Y,Z, as well as Distance to next point, and Heading(Direction) in the form of degrees 360, the Z axis is mostly irrelevant as I am just trying to get this working on a flat plane for now and I have been looking everywhere and have yet to be able to find something that can point me in the right direction.   
new_X = X + cos(alpha)*distance;new_Y = Y + sin(alpha)*distance;You may need to manipulate the angle a bit (e.g., from degrees to radians) before you get this to work.   ;  Alpha in that being the direction?   ;Quote:Original post by RecursionAlpha in that being the direction?Yes.   ;  Doesn't seem to be working, tried it with a 0 heading and the X should've stayed static but it did change.Starting Location -> 715067z, 365310y, 9432z, 1450h (127.4414062 degrees)Target Location -> 714949x, 365219y, 9432zDistance between the two should be 149 give or take.However when plugging in the equations after converting the degrees to rad withfloat DegreeToRadians(float Deg){static float PI = 3.14159265358979323846264338327950288419716939937510;return (Deg * PI / 180);}It still doesn't work correctly.   ;  What do you mean by "it still doesn't work correctly"? What code did you use? What did you expect it would do? What did it do instead?Now you seem to have a target location. You didn't say anything about a target location. How about we start from the beginning: What problem exactly are you trying to solve?;  Scratch that, the errors were due to the heading being weird.Had to negate X sin and make Y use cos.this->setX((XCoord + (-sin(radianDirection) * DIST)));this->setY((YCoord + (cos(radianDirection) * DIST)));[Edited by - Recursion on November 18, 2010 2:04:37 AM]