PocketMatrix forums

A read-only archive of the PocketMatrix forums (2001–2014). Posting and accounts are closed.

Rotating objects around each other

PointOfLight · 02 Jul 2008, 16:57 UTC
I'm sorry to ask such a basic question, and I realize this isn't really even GapiDraw specific, but since I'm using GapiDraw I thought I'd bug you guys first. I have a simple problem where I have an object in the middle of my screen, and when I rotate that object I need several other objects around it to rotate as well. What should make this even easier is that the paths of the ancillary objects is circular. However, when I try to implement a routine to calculate the paths of these objects, they end up orbiting the main object in an elliptical fashion rather than a circular one. If anyone has any code snippets or can point me to a web site explaining the math for what I want to do, I'd very much appreciate it.
PointOfLight · 03 Jul 2008, 13:37 UTC
I figured out my problem. It turns out that I was using the wrong point on my rotating objects to determine the radius around which they needed to travel. Once I picked the center of the object as the point of reference everything worked fine.
Ok glad to hear you solved it!

I have been busy with GapiDraw 3.8 the past days and did not have time to look into it before you resolved it yourself!

Cheers
Johan