Skip to main content
GameDev.net gamedev.net
🔒 Locked

OpenGL problem

Started by sir_wojciech Jun 29, 2004 at 2:03 PM 3 replies 1.2k views
Original Post
sir_wojciech
sir_wojciech
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?
lazork357
lazork357
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?)
abvenia
abvenia
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.
clum
clum
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)

Topic Locked

This topic has been locked by a moderator. New replies are not allowed.

Sign in to reply to this topic.