Search Unity

  1. Good news ✨ We have more Unite Now videos available for you to watch on-demand! Come check them out and ask our experts any questions!
    Dismiss Notice

ARFoundation: Scaling entire screen

Discussion in 'Handheld AR' started by AndyLangberg, Feb 20, 2019.

  1. AndyLangberg


    Jul 6, 2018
    I've gotten a request from my customer to let them be able to "zoom" the screen. Since zooming only the content (Which is meant to be placed on a table next to a physical object) would look weird, I translate the request as wanting to be able to zoom in with the camera itself. Is there any readily available solution to this in arfoundation? Changing the fov does nothing on the ipad, and every other solution for zooming only scales the content, not the real world itself.
  2. tdmowrer


    Unity Technologies

    Apr 21, 2017
    To "zoom" the camera image, you'd need to crop the texture and then stretch it to fit the screen. There's no easy way to do that, but you could look into writing your own background renderer. In the
    is where we setup the background texture blit. You can subclass the background renderer and override that method to manipulate the camera texture.

    That is potentially a bit of work though. You might want to clarify your customer's request to ensure that is really what they want before going that route.
    AndyLangberg likes this.