Advertisement

OpenGL problem

Started by June 29, 2004 02:03 PM
3 comments, last by clum 20 years, 5 months ago
I've got a problem. When I draw a house not in the center the camera rotates around the center, but the house rotates it's self around it's center. But I won't it to rotate around the center of the ground (like planets around the sun)? What can I do?
Since your post is not completely clear to me, let me ask you a few question:
Is it right that you want to rotate the house?
(I simply can't see why you would need to rotate an house)
How do you rotate the camera?
And what about the house?
(do you translate it before rotating it or after?)
Advertisement
after reading the question 5 times or so, what I think he wants to do is keep the "camera" on the hosue the whole time & rotate that camera around the house in an orbital fashion... "like the planets around the sun".
Quote: Original post by sir_wojciech
I've got a problem....What can I do?


Not sure I completely understand your question; but I'm going to assume that you want both the house and camera (who knows why) to rotate about the center of the screen.

In order for the house to rotate about the center of the screen; call the rotation before translating out to draw it.

Why you would want a camera rotation and a house rotation I don't know... you might not. A bit of clarification would help.
What is your camera? There's no such thing as a camera in OpenGL (last time I checked). You'd better post your code so we can look at it and better describe a) what's happenning b) what you want it to do
Zorx (a Puzzle Bobble clone)Discontinuity (an animation system for POV-Ray)

This topic is closed to new replies.

Advertisement