- Home /
Web Game - lag when mouse moves
Hello.
I'm making a very simple arcade web game with only a few objects in scene. When I test it everything works great with no lag, but when the user moves the mouse then the game gets a lot of lag so my objects begin to seep between platforms.
The mouse isn't a game control, the only Input that I have configured is the spacebar.
I have the same problem when I test it in kongregate as when I test it directly on browser(Chrome and firefox)
I don't have this problem when I run the game in unity
What can I do?
Do you have a link to the game on $$anonymous$$ong? Something may occur to me if I give her a go.
Can you provide a replicatable example? What platform have you built for? (Plugin, Flash, NaCl). If there is no way of replicating the issue, then this is a Unity bug and should be reported. In that case, I suggest a reinstall :)
Answer by tw1st3d · Jul 08, 2013 at 03:23 PM
Lock your mouse, so it won't recognize any input from it.
void Start()
{
Screen.lockCursor = true;
}
If you need it before you actually start the game, just have a method trigger that code when you open the new scene.
Answer by Tortoiseius · Jul 09, 2013 at 07:42 AM
I thought that I was the only one with this problem but I already run some other games in Kongregate that were made with unity and it happens the same problem I: and because I don´t see any questions about this problem; I think that the problem is my pc :C
Your answer
Follow this Question
Related Questions
Where/ How can I find out what is affecting my webplayer window-mode performance? 0 Answers
Why can't I build Web Player in Unity while I have no problems with building standalone versions? 2 Answers
Unity 5 and Chrome Browser are not playing nice 3 Answers
Web Player on Chrome lagging. Smooth in Fullscreen mode 0 Answers