PDA

View Full Version : GLScene in Dephi - Co-ordinates



Warren2101
24-10-2006, 08:31 AM
Hey guys.

You seem like the inteligent bunch here so I was wondering if someone could please help.

I am new to the world of 3D and am using GLScene for Delphi which is a superby OpenGL library for game development.

My question(s)......

1) Could someone please explain the co-ordinate system of x,y,z. My problem is I still consider everything in 2D (x,y).

2) I have a cube as a base and want to get a ball moving along it evenly, as in a pong clone for my learning curve.

Thanks to anyone who can help an idiot like me. :cry:

tpascal
24-10-2006, 06:19 PM
1) Could someone please explain the co-ordinate system of x,y,z. My problem is I still consider everything in 2D (x,y).


Short answers...it works almost like in 2d where X control the position of your object going left/right, Y control position going Up/down; but additionaly now you have Z which control position of your object going depth into the screen; (like if you can go now to the mountains seen in the background in your 2d scene). objects with same x,y values position but different Z value position will be seen with diffrent size, object far depth into the screen will be seen smaller.

Another thing you have to deal in 3d app is that additionaly to the x,y,z position of your object, you also need to declare the x,y,z position where YOU (the viewer) is located, and the position x,y,z where YOU (the viewer) are looking at.

Warren2101
25-10-2006, 08:07 AM
Thanx Bud.

That helps a lot. Something so simple makes you wonder why I'm bothering with 3D, but we all started somewhere. :lol: