Search Unity

  1. Megacity Metro Demo now available. Download now.
    Dismiss Notice
  2. Unity support for visionOS is now available. Learn more in our blog post.
    Dismiss Notice

zooming and panning a picture in a GUI window

Discussion in 'Immediate Mode GUI (IMGUI)' started by nelsig, May 22, 2014.

  1. nelsig

    nelsig

    Joined:
    May 22, 2014
    Posts:
    1
    Hello,

    is there a way to zoom and pan a picture in a GUI window ?

    I'm trying to display a photography of an object represented in 3D in my scene, and when the user click on it, it opens a picture in a GUI.

    But now, I would like the user to be able to zoom with the mouse wheel and pan the image to look in detail the photography.

    Is there a way to do that in a GUI ?


    Thanks a lot for your help
     
  2. zehreken

    zehreken

    Joined:
    Jun 29, 2009
    Posts:
    112
    As you can change the size and position of an image in GUI, with the help of some maths, it's totally doable.
     
    Last edited: May 23, 2014
  3. TonyLi

    TonyLi

    Joined:
    Apr 10, 2012
    Posts:
    12,670