PDA

View Full Version : Rotating around a point and Rotating across own axis



Mighty
09-09-2004, 10:54 AM
I'm having a rotation problem which I'm hard time figuring out why it is happening. I have these objects which I want to revolve across their axis by the same angle as I'm rotating their own position around point.

I'm using glRotatef to turn cubes and using their positions which i assign to them and multiply them by a rotational matrix (not done through oGL).

Here's the demo, should be easier to understand from this. Just mix up the permutations and you'll see the problem.

http://homepages.udayton.edu/~angerevm/Rubik.exe
Basic Controls:
q, w, e : rotate columns 1,2,3 front to top (front being the side initially viewed by the program)
a, s, d : rotates columns 1,2,3 left to top
r,f,v : rotates columns.. err rows left to front

Also CTRL + Left_Mouse plus motion orbits the view around the point.

I'll probably figure it out sooner or later, just wondering if any pros can shorten my time with a workaround, or any additional info on what might be my problem.

If you're willing and need more info, or source - just ask.

Thanks,
Evan

09-10-2004, 02:22 AM
hey Mighty, maybe you could rephrase your question. im having trouble getting it through my thick head. rotation problems are easy to answer once the right question has been asked. maybe you could post a little code too.

:)

Only Sophoo...
09-10-2004, 10:15 PM
I saw your application.
I could not really understand what the problem is
Is your prblem - that some of the faces are turning black ??