Wayback Machinekoobas.hobune.stream
May JUN Jul
Previous capture 13 Next capture
2021 2022 2023
1 capture
13 Jun 22 - 13 Jun 22
sparklines
Close Help
  • Products
  • Solutions
  • Made with Unity
  • Learning
  • Support & Services
  • Community
  • Asset Store
  • Get Unity

UNITY ACCOUNT

You need a Unity Account to shop in the Online and Asset Stores, participate in the Unity Community and manage your license portfolio. Login Create account
  • Blog
  • Forums
  • Answers
  • Evangelists
  • User Groups
  • Beta Program
  • Advisory Panel

Navigation

  • Home
  • Products
  • Solutions
  • Made with Unity
  • Learning
  • Support & Services
  • Community
    • Blog
    • Forums
    • Answers
    • Evangelists
    • User Groups
    • Beta Program
    • Advisory Panel

Unity account

You need a Unity Account to shop in the Online and Asset Stores, participate in the Unity Community and manage your license portfolio. Login Create account

Language

  • Chinese
  • Spanish
  • Japanese
  • Korean
  • Portuguese
  • Ask a question
  • Spaces
    • Default
    • Help Room
    • META
    • Moderators
    • Topics
    • Questions
    • Users
    • Badges
  • Home /
avatar image
0
Question by robpen · Feb 22, 2013 at 07:22 AM · inputunity3.5

Input.ResetInputAxes() not freezing first person controller on all axes

I'm following a tutorial for Unity 3.5, and trying to set up something where escape key can be used to toggle system cursor on and off, and also to freeze the responsiveness of Unity to user input (so you can move cursor up to deselect the play button without game responding to your moving cursor)

The Input.resetInputAxes() does freeze motion in response to mouse movements left and right, and also deactivates the WASD movement keys. But game still follows mouse movements Up and Down when shouldn't respond at all. Any ideas on problem?

Thanks

Comment
Add comment · Show 3
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users
avatar image sfcl33t2 · Apr 02, 2013 at 12:04 AM 0
Share

Hey rob - did you have any luck? I am working on the same tutorial and ran into the same issue. I am assu$$anonymous$$g it is a 3.5 versus 4 issue.

avatar image $$anonymous$$ · May 03, 2013 at 01:10 AM 0
Share

I'm having the same problem!

Has anyone found a solution to stopping the up and down movement on escape?

avatar image sami1592 · Feb 02, 2014 at 05:29 AM 0
Share

i am following lynda unity 3.5 tutorial

i have the same problem :/

2 Replies

· Add your reply
  • Sort: 
avatar image
0

Answer by liveuk · Nov 15, 2013 at 10:37 PM

Hi Guys the Mouse look script is also on the controller and that is still active You would have to do the same to the other script or scripts you have on the controller that you did in the tutorial. Maybe the controller only had one script on it back when the tut was made

Mike oobydoo

Comment
Add comment · Show 2 · Share
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users
avatar image liveuk · Nov 16, 2013 at 09:02 PM 0
Share
 var fpc : GameObject;
 internal var show$$anonymous$$enu : boolean = false;
 
 function Start () {
 
     // Hide Cursor
     Screen.showCursor = false;
 
 }
 
 function Update () {
 
     if (Input.Get$$anonymous$$eyDown ("escape")){
             if (Screen.showCursor == false) {
             fpc.Send$$anonymous$$essage("ToggleInput", true);
             Screen.showCursor = true;
             show$$anonymous$$enu = true;
             }
             else {
                 ResumeGame ();
             }
         }
 
 
 
 
 }
 
 
 
 function OnGUI () {
 
     if (show$$anonymous$$enu == true) {    
     
         GUI.BeginGroup(Rect(Screen.width / 2 - 50, Screen.height / 2 - 45,100,90)); 
             
             GUI.Box(Rect(0,0,100,90), "$$anonymous$$enu");    
             
             if(GUI.Button(Rect(10,30,80,20), "Quit")) {
                 Application.Quit();
             }
             
             if(GUI.Button(Rect(10,60,80,20), "Resume")) {
                 ResumeGame();
             }    
     
         GUI.EndGroup ();
     }
 
 }
 
 function ResumeGame () {
 
     Screen.showCursor = false;
     fpc.Send$$anonymous$$essage("ToggleInput", false);
     show$$anonymous$$enu = false;
 
 }
 
avatar image sami1592 · Feb 02, 2014 at 05:32 AM 0
Share

i don't get it :/

avatar image
0

Answer by neesonch · Aug 04, 2014 at 11:52 PM

For those following the Lynda Unity 3.5 tutorial - as Mike mentions above, there are two different scripts for mouse control of the camera (I'm using Unity 4.5.1f3);

i) FPSInputController.js directly on the 'First Person Controller' object ii) MouseLook.cs on the 'Main Camera' child of First Person Controller

If you apply the tutorial code only to the first script, the game view will still tilt up and down the Y axis in response to mouse movement. Simply apply the code from the tutorial to the second script as well as the first (translating syntax from JavaScript to C# where appropriate) and you should see the desired result.

Comment
Add comment · Share
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users

Your answer

Hint: You can notify a user about this post by typing @username

Up to 2 attachments (including images) can be used with a maximum of 524.3 kB each and 1.0 MB total.

Follow this Question

Answers Answers and Comments

13 People are following this question.

avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image

Related Questions

Help In Making a SphereCast for 3D Tire! Working RayCast Script included! 0 Answers

Input.GetAxisRaw("Mouse ScrollWheel") 4 times 0 Answers

How to get Input Button name? 2 Answers

Checking whether string is a valid Input.Key 1 Answer

How can I synchronize the cooldown on two separate scripts? 2 Answers


Enterprise
Social Q&A

Social
Subscribe on YouTube social-youtube Follow on LinkedIn social-linkedin Follow on Twitter social-twitter Follow on Facebook social-facebook Follow on Instagram social-instagram

Footer

  • Purchase
    • Products
    • Subscription
    • Asset Store
    • Unity Gear
    • Resellers
  • Education
    • Students
    • Educators
    • Certification
    • Learn
    • Center of Excellence
  • Download
    • Unity
    • Beta Program
  • Unity Labs
    • Labs
    • Publications
  • Resources
    • Learn platform
    • Community
    • Documentation
    • Unity QA
    • FAQ
    • Services Status
    • Connect
  • About Unity
    • About Us
    • Blog
    • Events
    • Careers
    • Contact
    • Press
    • Partners
    • Affiliates
    • Security
Copyright © 2020 Unity Technologies
  • Legal
  • Privacy Policy
  • Cookies
  • Do Not Sell My Personal Information
  • Cookies Settings
"Unity", Unity logos, and other Unity trademarks are trademarks or registered trademarks of Unity Technologies or its affiliates in the U.S. and elsewhere (more info here). Other names or brands are trademarks of their respective owners.
  • Anonymous
  • Sign in
  • Create
  • Ask a question
  • Spaces
  • Default
  • Help Room
  • META
  • Moderators
  • Explore
  • Topics
  • Questions
  • Users
  • Badges