Translation

Hey guys I am pretty new to opengl. My question probably has a really simple fix.

I have a plane and the center of my plane is at the origin.(Its a 2d plane)

I ask the user to give me a scalar number(distance from the plane for me to move the plane), and according to that number I need to Translate my plane in a 3d coordinate system.

I am assuming since my plane is 2d in 3d coordinate system my plane normal [0,0,1].

I use

glTranslatef(0,0,distance)

But it wont translate it where I want it to.

The effect you see on the screen will depend on your projection matrix. If you are using an orthogonal projection (usual in 2D) you will not see any effect when you project into the screen (ie change z).