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.
  2. We have updated the language to the Editor Terms based on feedback from our employees and community. Learn more.
    Dismiss Notice
  3. Join us on November 16th, 2023, between 1 pm and 9 pm CET for Ask the Experts Online on Discord and on Unity Discussions.
    Dismiss Notice
  4. Dismiss Notice

Scene View Camera Rotation Z axis

Discussion in 'Getting Started' started by Moncaoflow, Nov 17, 2020.

  1. Moncaoflow

    Moncaoflow

    Joined:
    Nov 17, 2020
    Posts:
    2
    I have been looking for an answer to this problem forever but simply cannot find a solution. I am trying to rotate the scene view around the z-axis because my game requires me to.

    Situation is like this, I am trying to build a 2.5D top-down game. The idea is to have 3D models but the collision detection should just be 2D.

    Because of the latter, as far as I understand, I need to build the game on the X-Y plane because that is the plane in which the 2d colliders live (in the X-Z plane the colliders are just lines and there is no way to rotate the colliders). This is of course possible by rotating the assets 90 degrees around the X-Axis but then I run into a problem in the scene view because the camera in the scene view only rotates around X and Y axes. So I cannot really view my scene from where I want to.

    Is there something I am doing wrong with my scene setup? Is there a way to rotate scene view around the Z axis? Any help appreciated. Cheers.
     
    sinedsem and Dotflyer like this.
  2. Dotflyer

    Dotflyer

    Joined:
    Aug 1, 2013
    Posts:
    2
    I'm having the same issue right now, and as a workaround there is this code by Akulist:
    https://forum.unity.com/threads/change-scene-view-camera-behaviour.649624/

    There is some issues when moving the mouse out of the Unity window when moving, but it's the best solution I've found. It would be great if Unity had the option to toggle the native "up" of the scene camera.

    Edit: I just noticed this issue can be fixed by commenting out the line 43 :)
     
  3. Moncaoflow

    Moncaoflow

    Joined:
    Nov 17, 2020
    Posts:
    2
    Thanks for the input Dotflyer, how did you get this to work? Just put the code in any script?