Hello,
i´m currently making a game and i have a small problem:
the user is able to rotate the camera, but the mouse should both be visible and not be able to move(always in the middle of the screen, but with delta movement).
using "mouse.setGrabbed" i get the latter, but it gets invisible.
Any ideas?
Acctually you can use Mouse.warp(midx, midy); to position the mouse on your window.
But I think its totally useless to do that, because you will always see the mouse at about the point you set it to, that means, the mouse will always be in the middle. Why show the mouse then?
Are you trying to use the mouse as a reticule for an FPS?
If you want it visible but not able to move, just make it invisible, and render your own graphic where you want the mouse to be.
QuoteAre you trying to use the mouse as a reticule for an FPS?
No, the user can move the mouse over the screen, if it gets near the borders, the camera moves. if he presses the middle mouse button, the mouse should stay where it was and rotate the camera.
QuoteIf you want it visible but not able to move, just make it invisible, and render your own graphic where you want the mouse to be.
trying this!
Ah. When you said "not be able to move" and "always in the middle of the screen" it sounded like you were talking about making the mouse immobile.
Regardless, I would achieve this by grabbing the mouse and then rendering your own cursor in-game like I said.
But remember to ungrab the mouse if anything goes wrong *laugh* ;D
QuoteBut remember to ungrab the mouse if anything goes wrong *laugh*
Yeah had this prob often while debugging... :)
Now it works. Thanks everyone! Download my game here (http://tobias.hilbig-ffb.de).