I don't think that's right. For rotating a point around the origin, try something like:
CODE
vector2d_f rotate_point(vector2d_f old_point, float rotation)
{
vector2d_f new_point;
new_point.X = old_point.X * cos(rotation) - old_point.Y * sin(rotation);
new_point.Y = old_point.X * sin(rotation) + old_point.Y * cos(rotation);
return new_point;
}
(from
http://en.wikipedia.org/wiki/Rotation_(mathematics) )
Thanks allot, workers perfectly, and in vastly fewer lines of code. Though exactly how i managed to miss that wiki page while looking for a fix I honestly don't know.
QUOTE
Actually, I believe there is a formula I learnt last year that makes orbits in 3D a lot simpler (although I never tried using it when programming ). When I can get to them, I'll have a dig through my old notes and see if I can find it.
Sounds interesting, 3D that isn't dreadfully complicated
Is there any way to mark this topic as solved?