I added an if condition in the MouseLook script, and I don't see any significant difference at the moment. I have the default FPController, a main and far camera. When I activate an onGUI trigger I add MouseLook.mouseLock = true and deactivate all cameras. Is that really wrong ? Should I do it in any other way ?
//so i can access the variable from everywhere.
//it all happens at the update...??!
and here is how i call it ..
asked Mar 29 '10 at 04:18 PM
So... your question is if your code is "wrong" or not? Because there's no right or wrong way to program something, I mean, sure, there are standards and practices and that sort of thing, but if your code works and shows no visible performance issue because of the code, I wouldn't say that it's "wrong"?
Short answer: If it works and doesn't make your game lag, it's fine.
answered Mar 29 '10 at 05:59 PM