0

Hello World ! Can anyone tell me how to put a '+' character at the screen centre in 3D World space..It should stay at the centre while moving camera..I don't want to use glutWarpPointer()...anyone who can tell me ..when I move my camera it must be at the screen centre..

2
Contributors
4
Replies
5
Views
6 Years
Discussion Span
Last Post by pcgamer2008
0

camera is rotating along with mouse movement using glutPassiveMotionFunc()...actually the problem is ..when I press only W(forward movemnt)...'+' remains its position but while pressing W button when I make some mouse movement...It doesn't stay in the centre...help me...

0

How are you positioning the '+' character? I assume you are trying to create a crosshair. What I would do is, have a crosshair image and use this formula to center it on screen.

crosshairX = (Screenwidth - crosshairImageWidth)/2
crosshairY = (Screenheight - crosshairImageHeight)/2

The camera should have no effect on the crosshair at all.

Edited by Akill10: n/a

0

ya you are right, I want put crosshair to shoot targets...I want to use '+' character(CROSSHAIR) at center instead of an image...i.e it will be get affected by camera..how to avoid this...I programmed for it...but didn't succeed...can you suggest me some idea ...

0

and which technique you use for inserting an image onto the GL screen...devIL library or any other concept...

This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.