Search Unity

Yet another camera scaling thingy... :)

Discussion in 'AR/VR (XR) Discussion' started by maewionn, May 23, 2018.

  1. maewionn

    maewionn

    Joined:
    Jan 18, 2016
    Posts:
    38
    Hi there :)

    Long Version:
    I am currently building an awesome mech simulator for VR, yet the camera is definitly too big. Since I don't want to scale the world (physics...), I am left with scaling the camera.
    The only fun thing is, that no matter what I parent the Cam to and no matter if I change the scale on either the Cam or the Parent, the Camera just stays the "same size", which is troublesome, since I dont want to enable the player to look through the roof of the mech... alll the time :D
    I know that the SteamVR and Vive support have features for that, but if I just want to stay with a "normal" unity build, how do I go about rescaling the cam?

    TL;DR:
    Can't scale the Camera, neither directly nor with rescaling the Parent. Can't rescale the world due to physics issues. How do I make the Camera Scale smaller?

    Thank a lot for the help in this already thoroughly discussed topic!
     
  2. LennartJohansen

    LennartJohansen

    Joined:
    Dec 1, 2014
    Posts:
    2,394
    scaling the camera.transform.parent should normally be the way to do it.
     
  3. maewionn

    maewionn

    Joined:
    Jan 18, 2016
    Posts:
    38
    Should it? I attached 2 Screenshots, one with Camera Parent Scaled down and one with Camera Parent Scale at (1,1,1).

    So, there should be a difference, right?
     

    Attached Files:

  4. LennartJohansen

    LennartJohansen

    Joined:
    Dec 1, 2014
    Posts:
    2,394
    Not as a single image, but it shoud change the distance between the 2 eye frustrums. This will make you think the scale is different,
     
  5. maewionn

    maewionn

    Joined:
    Jan 18, 2016
    Posts:
    38
    Ah, so I should see a difference in the Oculus? Oh, that is interesting, will give that a try right now! Would you happen to know of any kind of way of displaying that inside the editor as well?

    Offtopic: I just stumbled upon your amazing asset since I was intrigued what A.W.E.S.O.M.E is. Looks amazing!

    EDIT:
    Jep, it helped greatly. Thanks a lot, kind Sir Johansen.
     
    Last edited: May 23, 2018
  6. LennartJohansen

    LennartJohansen

    Joined:
    Dec 1, 2014
    Posts:
    2,394

    Good it works :)

    Lennart
     
    maewionn likes this.