Skip to main content

Indie game storeFree gamesFun gamesHorror games
Game developmentAssetsComics
SalesBundles
Jobs
TagsGame Engines

Mouse cursor is not locking to game screen.

A topic by Raimundo3D created Jan 23, 2017 Views: 3,027 Replies: 2
Viewing posts 1 to 2

Hello itchy people!

I'm trying my 1st project in itch and I've already stumble on a road block..

All is working as expected except for the mouse control. When I try to move around using the mouse, the cursor goes out of the game window and I can't keep turning around.

Probably I'm not making myself clear so feel free to take a look and see by yourself what I'm trying to explain:

https://raimundo3d.itch.io/casa

Also, when I click the fullscreen button I get white bars all around.


Thank you for your help!

(+1)

It worked for me- you just have to click inside the window. It comes down to how you handle locking the mouse cursor in the game, but I think it'll always be a bit janky.

Also, I'm not sure about the white bars, but I assume it has to do with the aspect ratio you're working with- when you upload a Unity game, you might need to open the index.html file and change the dimensions written in there like "height="600px" width="960px", or whatever your dimensions are.

I'm really bad at making the sizes work, so I can't really help with the actual numbers you should use, but I think that's the problem.

Thank you Stolenoc!

It looks like it as something to do with Safari on my MacBook. In my Windows 10 machine is working correctly.

I will try your tip about the dimensions.