I’m working on a 2d scroller in which the character is moved with the arrow keys and the mouse is used for targetting. I’d like to have the mouse cursor remain over the same target as the scene scrolls, which means having it move left or right on the screen. Is there any way to move the mouse cursor in code?
I have considered alternatively drawing my own cursor and keeping track of how far displaced it is from the ‘real’ cursor, but problems arise when the real cursor hits the edge of the screen.
In a related question, I have another idea for a game that uses a trackball (a la the old arcade game Marble Madness). I’m not using it as a pointer, I just want to measure how fast it is moving in any particular direction. Is there any way to do that without encountering the same problem with screen boundaries?