Maybe my topic title is a big vague, so i'll try to explain what i am trying to achieve.
In my game, i want to let the Player move with the mouse (not a regular one, its a trackball).
- Drag mouse up/down = Move in Z-axis
- Drag mouse left/right = Move in X-axis
In addition, i would like to let the player move with the strength of the mouse movement, so if he drags the mouse really fast to the left, the object should move left fast as well.
I was able to get this right by saving the mouse position on the "EMIE_MOUSE_MOVED" event, and in future triggers of this event, comparing it with current mouse position and use the difference as the "force".
But obviously, if i set the cursor in the middle of the screen (to avoid mouse leaving window):
Code: Select all
device->getCursorControl()->setPosition(0.5f,0.5f);To make a long story short