I am stuck on a little math problem and i dont know how to solve it.
I want to force Object A rotate around Object B. 2d math does it well.
x = -sin(angle) * distanceFromTarget + target->x
y = cos(angle) * distanceFromTarget + target->y
z = target->z
Everything works fine. But i have no idea how to adjust the angle of orbit math wise. I can simply do stuff like glRotatef(90, 1, 0, 0) and it will do the trick, but i want to have exact cords without using GL calls. Furthermore, i dont want to be bound only to one axis.
To make my question more precise - How to "bend" my orbit mathematically?
Edited by Sollum, 12 September 2012 - 02:09 PM.