Wayback Machinekoobas.hobune.stream
May JUN Jul
Previous capture 12 Next capture
2021 2022 2023
1 capture
12 Jun 22 - 12 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 poemind · Aug 17, 2011 at 05:24 PM · first-person-controllermouse lookfpc

First Person controller Mouse Look isn't working

I know that this has been asked before, but it was not answered to my satisfaction there. And the thread is now two years old. I am teaching a class in Unity and have used the FP Controller many times. But today I opened a new project, created a simple terrain, a FPC and ran it. Mouse look did not work! I had not altered it in any way. I shut down Unity and relaunched it, same result. Can anyone give me some insight as to why this is happening? It didn't happen to any of my students.

Very frustrated.

Comment
Add comment · Show 1
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 Cowboy_Jow · Jan 29, 2016 at 02:22 AM 0
Share

I just ran into the same problem. it appears that the $$anonymous$$ouslook script was changed in an update. Here is the old script:

 using UnityEngine;
 using System.Collections;
 
 public class $$anonymous$$ouselookClassic : $$anonymous$$onoBehaviour {
 
     public enum RotationAxes { $$anonymous$$ouseXAndY = 0, $$anonymous$$ouseX = 1, $$anonymous$$ouseY = 2 }
     public RotationAxes axes = RotationAxes.$$anonymous$$ouseXAndY;
     public float sensitivityX = 15F;
     public float sensitivityY = 15F;
 
     public float $$anonymous$$imumX = -360F;
     public float maximumX = 360F;
 
     public float $$anonymous$$imumY = -60F;
     public float maximumY = 60F;
 
     float rotationY = 0F;
 
     void Update()
     {
         if (Input.Get$$anonymous$$ey($$anonymous$$eyCode.F)) return;
         if (axes == RotationAxes.$$anonymous$$ouseXAndY)
         {
             float rotationX = transform.localEulerAngles.y + Input.GetAxis("$$anonymous$$ouse X") * sensitivityX;
 
             rotationY += Input.GetAxis("$$anonymous$$ouse Y") * sensitivityY;
             rotationY = $$anonymous$$athf.Clamp(rotationY, $$anonymous$$imumY, maximumY);
 
             transform.localEulerAngles = new Vector3(-rotationY, rotationX, 0);
         }
         else if (axes == RotationAxes.$$anonymous$$ouseX)
         {
             transform.Rotate(0, Input.GetAxis("$$anonymous$$ouse X") * sensitivityX, 0);
         }
         else
         {
             rotationY += Input.GetAxis("$$anonymous$$ouse Y") * sensitivityY;
             rotationY = $$anonymous$$athf.Clamp(rotationY, $$anonymous$$imumY, maximumY);
 
             transform.localEulerAngles = new Vector3(-rotationY, transform.localEulerAngles.y, 0);
         }
     }
 
     void Start()
     {
         // $$anonymous$$ake the rigid body not change rotation
         if (GetComponent<Rigidbody>())
             GetComponent<Rigidbody>().freezeRotation = true;
     }
 }
 

11 Replies

· Add your reply
  • Sort: 
avatar image
0

Answer by stopsecret · Aug 17, 2011 at 07:43 PM

Ok, so, first of all, is your mouse working? second of all, did you try reimporting the character controller package? third, is your unity up to date? fourth, have you looked in your edit --> project settings --> input folder? all these may be the problem it's not working. You may also consider creating a new project and retrying it.

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
avatar image
0

Answer by poemind · Aug 18, 2011 at 12:30 PM

Ok, yes my mouse is working. Yes, I tried re-importing Unity is probably not up to date, because the lab techs have not been on the ball over the summer, but it is the same version that my students were using successfully. I will look at the project settings, I had not looked at that. I will try making a new project.

But that doesn't answer the question as to why this would happen? Why would my project settings be different by default than my students?

Thanks for the quick response!

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
avatar image
0

Answer by poemind · Aug 19, 2011 at 02:25 AM

Today I did try the edit-> project settings -> input folder (?) idea. I think. I went to edit-> project settings -> input, and that opened an input panel. I'm guessing that is what you are speaking of. Looking at that I couldn't find anything amiss. What specifically should I be looking for? I check the MouseX and MouseY and they were both linked to Mouse Movement as I recall. I'm a bit at a loss.

Thanks in advance.

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
avatar image
0

Answer by MC HALO · Aug 19, 2011 at 02:35 AM

Hey go to my youtube channel and click on my video on unity tutorial. Then in my description box it will have my site web address and click on that and open it and in the site click on Script and download my unity package :) my youtube Channel is :

http://www.youtube.com/user/narutoisgreat1234?feature=mhee

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
avatar image
0

Answer by stopsecret · Aug 19, 2011 at 12:52 PM

Alright, so I think your mouse settings are fine. Have you tried reimporting the Character Controller package? If it still doesn't work after reimporting the first person controller, the FPC may be corrupted and you may want to try finding a copy of the character controller package that isn't corrupted on the web. The other thing to do, which I would highly recommend, is borrow one of your student's computers and analyze their project and your project carefully to see if there is anything different about your mouse look parameters- I hope this helps you! :)

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
  • 1
  • 2
  • 3
  • ›

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

12 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

Related Questions

first person controller left mouse button 1 Answer

FPController not working 1 Answer

I am working with first person controller, I cant control the clamp of main camera to specific rotation 0 Answers

mouse look not working in first person controller script 1 Answer

[CLOSED] FPC's childrens can't have collisions? 1 Answer


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