Quantcast
Channel: Answers for "disabling a script (MouseLook)"
Browsing latest articles
Browse All 10 View Live

Answer by kennypu

this would be better:if(Input.GetKeyUp(KeyCode.Escape)) GetComponent("MouseLook").enabled = !GetComponent("MouseLook").enabledwhat that does is it'll flip the true and false. so if its true, it'll be...

View Article



Answer by Jessy

There's not much that's right about that script. Try this instead, and let us know if that's what you're talking about.function Update () { if (Input.GetKeyUp(KeyCode.Escape)) { var mouseLook =...

View Article

Answer by IBDelta

I think what these fine people fail to realize is that the FPS controller has two MouseLook scripts attached, one only appears to control the vertical for some strange reason I may never fully...

View Article

Answer by goldkillerv

function Update() { if (Input.GetKeyDown ("Esc")) { GameObject.Find("First Person Controller").GetComponent(MouseLook).enabled = false; } else { GameObject.Find("First Person...

View Article

Answer by tenukii

Example code for a main menu that toggles on escape key and turns off mouse look in C#. Of course you have to traverse whatever object hierarchy you have, not just blindly copy/paste. *ps: Their are...

View Article

Browsing latest articles
Browse All 10 View Live


Latest Images