Search Unity

  1. Welcome to the Unity Forums! Please take the time to read our Code of Conduct to familiarize yourself with the forum rules and how to post constructively.

First Person Controller - Mouse Look doesn't work

Discussion in 'Editor & General Support' started by Verbal, May 13, 2009.

  1. Verbal

    Verbal

    Joined:
    May 6, 2009
    Posts:
    4
    Hi,

    I just added the First Person Controller Prefab form the Stabdard Assets folder to my my scene. When I start the game the arrow controll works but the mouse controll ain't. There is no rotation...

    The MouseLook Script is active. I didn't change anything on that.

    Has anybody a idea why the mouse controll doesn't work for me?
     
    HolyMarshmallows888 likes this.
  2. antenna-tree

    antenna-tree

    Joined:
    Oct 30, 2005
    Posts:
    5,325
    What type of mouse are you using? Does mouse input work for you at all?
     
  3. Verbal

    Verbal

    Joined:
    May 6, 2009
    Posts:
    4
    It is a Logitech standard USB-Mouse. Yes, the Horizontal(XY)-Axis works but not the rotation.
     
    Kheopss likes this.
  4. bloodtiger10

    bloodtiger10

    Joined:
    Nov 9, 2008
    Posts:
    619
    have you looked at the settings of it so if you disabled like the mouse look script on the player prefab or the camera inside the player prefab also are both axises set to Y because tht would do it. Check things like tht first
     
  5. Don-Gray

    Don-Gray

    Joined:
    Mar 18, 2009
    Posts:
    2,278
    This happens here randomly but enough for me to have seen it many times.
    I also have seen many times an issue with strafing stuck on with the FPC prefab.
     
  6. Verbal

    Verbal

    Joined:
    May 6, 2009
    Posts:
    4
    okay. that worked. i had to set the axes to MouseXAndY. thanks
     
  7. adamz

    adamz

    Joined:
    Jul 18, 2007
    Posts:
    1,148
    I'm had the same problem. It was working fine, but then once I parented an object, or mess around with image effects, it changes the settings for whatever reason. This happens frequently for me.

    The easiest solution is to make sure your settings are correct for the Mouse Look (Script) on the First Person Controller:

    First Person Controller - Axes: MouseX.
    Main Camera - Axes: MouseY.

    That does the trick for me. Hope this helps...
     
  8. adamz

    adamz

    Joined:
    Jul 18, 2007
    Posts:
    1,148
    Actually I take that back. I got it working again, added some more objects (didn't even touch the FPC), played the scene and it stopped working once again. My setting are correct for the FP Script.

    What am I missing here? This is very frustrating since it happens often. Can any developers help us out?

    Thanks.
     
  9. bloodtiger10

    bloodtiger10

    Joined:
    Nov 9, 2008
    Posts:
    619
    reimport the script that might help. come back if it doesn't work
     
  10. adamz

    adamz

    Joined:
    Jul 18, 2007
    Posts:
    1,148
    I close out of Unity and reopen the scene and it works. Frustrating, but it gets the job done.
     
  11. Poemind

    Poemind

    Joined:
    May 25, 2011
    Posts:
    30
    I am teaching a Unity class and this is boggling me! I haven't changed a thing to the script. I created a first person controller and play. Mouse look doesn't work. I shut Unity down and re-launch doesn't work. I've reimported the script. Nothing. Can anyone please tell me what is going on here? It is working for my students but not me. Makes me a little perturbed honestly.
     
  12. deskchicken

    deskchicken

    Joined:
    Oct 10, 2008
    Posts:
    9
    Poemind,I've noticed if I touch my notebook's trackpad after launching the Unity scene, my mouselook no longer seems to detect the movement of my external mouse (trackpad still works fine). Perhaps you're flipping back and forth between different mouse devices?

    Also, when using my external mouse with the mouselook script that comes with the FPS controller prefab, I find the camera "snaps" around erratically from time to time, whereas I don't notice this (or haven't yet anyhow) when using my trackpad. Maybe both of these are just mouse issues?
     
    HolyMarshmallows888 likes this.
  13. chrismarch

    chrismarch

    Joined:
    Jul 24, 2013
    Posts:
    444
    I had this problem after importing some assets, which seemed to change the InputManager so that Mouse X and Mouse Y were no longer set up. Since I wanted the InputManager settings to be the defaults, I needed to reset it. So, I solved the issue by opening the InputManager tab, from the Edit/Project Settings/Input, and then I selected Reset from the drop down menu that appears if you click the gear with the arrow below it in the InputManager tab.
     
    HolyMarshmallows888 and Rando51 like this.
  14. tw15t3d

    tw15t3d

    Joined:
    Nov 21, 2013
    Posts:
    1


    Thank you for that quick fix,

    I have just downloaded some new assets which cost me a bomb and was worried there that i would not be able to play them :$

    Thanks again dude!
     
  15. TheItCrOw

    TheItCrOw

    Joined:
    Mar 29, 2017
    Posts:
    1
    I tried everything of the above but none helped. I now finally fixed the problem; I deleted the Main Camera from the start, and tagged the FPS camera as Main Camera. This solved my problem with the MouseLook
     
  16. hypergdd

    hypergdd

    Joined:
    Nov 13, 2019
    Posts:
    2
    that helped me. the object where you use for movement is mouseX, the camera is mouseY, Thanks
     
  17. Kheopss

    Kheopss

    Joined:
    May 8, 2021
    Posts:
    1
    For me i had to press Y thank you so much im new in this sotware ..
     
unityunity