PDA

View Full Version : Opengl viewing issue



Daisuke
12-12-2010, 08:03 AM
Hi I'm working on a simple basketball game using opengl.

I translate to the scene using
translatef(-xpo,-ypos,-zpos). (x,y,z) being world coordinates.

When I draw obj models (Ball) to a x,y,z using translatef() to specify coordinate they are not realistically rendered.

When I move toward an object they appear to move closer to me than I walk toward them. So an object that may be 100 units away in the -z direction would look drawn further away. I know this because I drew some textured quads to use as reference. Because of this issue I am having trouble placing objects within the scene.

Daisuke
12-12-2010, 12:41 PM
Maybe I should clarify the problem better.

In my game I keep track of the position of the ball.
I draw the ball by translating according to their position then drawing the vertices.

However in the game this causes the ball to be drawn unrealistically. If a ball is 100 units away, it looks like it's drawn 200 units away.

Daisuke
12-14-2010, 08:54 AM
Issue solved. Seemed to just be an illusion caused by the fact I didn't have any shadows or anything.