How to set the mouse position? [message #54648] |
Mon, 02 July 2007 01:42 |
airy.jiang
Messages: 37 Registered: May 2007
|
Member |
|
|
Hi,All!
Recently I'm trying to realize some visual effect like playing a first
person visual angle game,for example,"Counter Strike","Quake3".In
these games,you can use the mouse just like to turn your head around
to watch the different directions.Then the question has coming.The
game like "CS" and "Quake3" are fullscreen games,they made the mouse
always in the center of the screen(like a crosshairs) ,the offset of
the mouse movement represent the rotating angle of "your head".I wanna
make some similar effects.But when I trying to use the infromation
which return by the event of the Widget_Draw,I've found some
troubles.I can't set the mouse position to the center of the screen.So
I can get the coordinates of the mouse position from
event.x,event.y,but I can't set the mouse to the position [0,0](device
coord) by set event.x,event.y equal 0.Is there anyway to change the
mouse position by writing some code rather than by move it with my
hand?
Thanks!
|
|
|