How to keep mouse cursor in the screen ?

Discussion in 'Scripting' started by Erguntech, Apr 24, 2011.

  1. Erguntech

    Erguntech

    New Member

    Joined:
    Feb 21, 2011
    Messages:
    11
    Hi guys,
    I builded a little sample game with first person shooter script. everything works well with it, and its windowed screen.

    I start the game and when the mouse goes of the screen the character turns too much.

    I want that the mouse cursor cannot go out of the screen. What is the way to do that ?

    Any help would be apreciatted... :rolleyes:
  2. BlackGecko

    BlackGecko

    New Member

    Joined:
    Mar 25, 2011
    Messages:
    10
    I tried hiding the cursor but it didn't work. The cursor can still go out of the window. Maybe the screen object can be helpful
  3. Tavahka

    Tavahka

    New Member

    Joined:
    May 10, 2011
    Messages:
    7
  4. GargerathSunman

    GargerathSunman

    Member

    Joined:
    May 1, 2008
    Messages:
    1,533
    Screen.lockCursor may be your only option in this case.