Michael
2002.10.27, 07:58 PM
Does anyone know of a way to have a program set the mouse location in C? The LMSetMouseLocation function in LowMem.h has been phased out in Carbon, and the Apple page says that it is impossible for an application to change the mouse location directly.
Background: I'm trying to program a Crystal-quest style mouse control for a game. Basically, to do that control style:
Store the location of the mouse
If the mouse moves, accelerate your ship in that direction
Store the new location of the mouse
So basically, moving the cursor accelerates in the direction that you moved it in. It's very intuitive, but the problem is that the cursor can end up moved all the way to one side of the screen, and will move no farther. So the work-around is to re-center the mouse each frame...
Background: I'm trying to program a Crystal-quest style mouse control for a game. Basically, to do that control style:
Store the location of the mouse
If the mouse moves, accelerate your ship in that direction
Store the new location of the mouse
So basically, moving the cursor accelerates in the direction that you moved it in. It's very intuitive, but the problem is that the cursor can end up moved all the way to one side of the screen, and will move no farther. So the work-around is to re-center the mouse each frame...