Forum Discussion

🚨 This forum is archived and read-only. To submit a forum post, please visit our new Developer Forum. 🚨
designico's avatar
designico
Honored Guest
13 years ago

Scaling the depth in Unity?

Hi guys,

I need to match the size of my character in VR to the same optical size of my body. Is there an easy way to say the oculus plugin to change the depth? Or do I have to scale my hole scene unitil it matches? If not is there an easy way to globaly change the scale of the scene without infacts the scripts??

3 Replies

Replies have been turned off for this discussion
  • Why do you need to do this?
    The Unitys coordinate system is in meters, so as long as you follow that you should not have any issues with scale?
  • "designico" wrote:
    Hi guys,

    I need to match the size of my character in VR to the same optical size of my body. Is there an easy way to say the oculus plugin to change the depth? Or do I have to scale my hole scene unitil it matches? If not is there an easy way to globaly change the scale of the scene without infacts the scripts??

    You should scale your scene to be 1 unit = 1 meter. Scaling the camera is more prone to error. A simple way to scale your entire scene:
    - Create an empty game object. Name is "Everything".
    - Drag all of the objects in the scene into the "Everything" object.
    - Scale the "Everything" object. This will scale your entire scene.
    - Drag all of the objects out of the "Everything" object.
    - Delete the "Everything" object.
  • Hi and thanks for yours answers!
    It's a shame but at the beginning of the development of my game I didn't care about scaling and meters.
    Know I have a bunch of scripts that are depending on current scaling I guess...

    But I see, if there is no way to rescale the depth with the oculus plugin I must rescale the scene and rewrite same values...
    -----edit-------
    I found out that if you change the value IPD of the OVR camera controller(script) in runtime(!) you can scale the depth of the whole scene very easily. But I'll rebuild my whole avatar and the some scripts to ensure that every thing is in the 1:1 scale.

    Thanks for your help guys!