Return Styles: Pseud0ch, Terminal, Valhalla, NES, Geocities, Blue Moon. Entire thread

2D Vector bullshit

Name: Anonymous 2008-11-14 6:04

I've got 2 points (ie. X,Y vectors), and I need to find out the angle (degrees°) between them, so I can move an object which is at one of the points towards the other point.

How do I calculate the degrees plz???

Name: Anonymous 2008-11-15 15:35


void Object_t::Move()
{
     Accel.x = thrust * cos(DEG2RAD(headingDegs)); ?? OMG SO FUCKING OPTIMZIED!!!!!!!!!
     Accel.y = thrust * sin(DEG2RAD(headingDegs));

     Vector += Velocity;
}

Newer Posts
Don't change these.
Name: Email:
Entire Thread Thread List