Search Unity

Bug Camera wont rotate

Discussion in 'Editor & General Support' started by Kyfinatic, Apr 21, 2021.

  1. Kyfinatic

    Kyfinatic

    Joined:
    Apr 21, 2021
    Posts:
    5
    I've been working on this scene for weeks and I haven't had this problem until now. I can't rotate my scene view or my in-game camera left or right. When I hold Alt/Opt to rotate it just wont go left or right and I also tried right click. I have tried closing and reopening unity and playing my game then stopping it. I need to get this fixed soon. please help
     
  2. Kurt-Dekker

    Kurt-Dekker

    Joined:
    Mar 16, 2013
    Posts:
    38,689
    Camera stuff is tricky. You may wish to consider using Cinemachine (a package from Unity) for your camera stuff.

    Alternately, to help gain more insight into your problem, I recommend liberally sprinkling Debug.Log() statements through your code to display information in realtime.

    Doing this should help you answer these types of questions:

    - is this code even running? which parts are running? how often does it run?
    - what are the values of the variables involved? Are they initialized?

    Knowing this information will help you reason about the behavior you are seeing.

    If you are running a mobile device you can also see the console output. Google for how.
     
    Joe-Censored likes this.
  3. Joe-Censored

    Joe-Censored

    Joined:
    Mar 26, 2013
    Posts:
    11,847
    Are you sure you don't have scene view in 2D mode?
     
    Kurt-Dekker likes this.
  4. Kurt-Dekker

    Kurt-Dekker

    Joined:
    Mar 16, 2013
    Posts:
    38,689
    Oh nice, didn't even think about the Scene window. That might well be it!
     
    Joe-Censored likes this.
  5. Joe-Censored

    Joe-Censored

    Joined:
    Mar 26, 2013
    Posts:
    11,847
    That's the only thing I know of which specifically prevents scene view camera rotation as described in the OP. I looked around, and can't find anything else.

    If nothing suggested helps, I'd suggest posting a screen shot of what your editor looks like when you're having this problem.
     
  6. Madgvox

    Madgvox

    Joined:
    Apr 13, 2014
    Posts:
    1,317
    It's also possible that OP inadvertently locked the scene gizmo.

    upload_2021-4-21_20-8-48.png

    Though this does not affect in-game cameras, so I'm not sure why the in-game camera wouldn't be rotating either.
     
    Joe-Censored likes this.
  7. Kyfinatic

    Kyfinatic

    Joined:
    Apr 21, 2021
    Posts:
    5
    This is what my screen looks like. I can move my mouse left and right but not my camera.
     

    Attached Files:

  8. Kyfinatic

    Kyfinatic

    Joined:
    Apr 21, 2021
    Posts:
    5
    I checked that and I'm not
     
  9. Kyfinatic

    Kyfinatic

    Joined:
    Apr 21, 2021
    Posts:
    5
     

    Attached Files:

  10. Madgvox

    Madgvox

    Joined:
    Apr 13, 2014
    Posts:
    1,317
    Does this happen in a new project?
     
  11. Kyfinatic

    Kyfinatic

    Joined:
    Apr 21, 2021
    Posts:
    5
    It has the problem in a new project
     
  12. N3w_User

    N3w_User

    Joined:
    Mar 8, 2024
    Posts:
    1
    Why i can't rotate camera while designing lvl? I've just started tom develop game, but camera doesn't want to rotate
     
  13. Madgvox

    Madgvox

    Joined:
    Apr 13, 2014
    Posts:
    1,317
    You are likely in 2D mode. Try pressing the '2' key on your keyboard.