Search Unity

Pan and Zoom on touchscreen with Cinemachine

Discussion in 'Cinemachine' started by petemanzel, Apr 17, 2021.

  1. petemanzel

    petemanzel

    Joined:
    Dec 30, 2017
    Posts:
    6
    Hi,
    i am working on a big scrollable image which is living inside a "scroll rect" and which i can scroll with the mousewheel. I got his perfectly working.

    Now i would like to zoom in to the image and pan it keeping it inside the screen and starting the zoom/pan in the center of the fingers touching the screen and on release the zoom should jump back to the original size.
    The behaviour should be like when you zoom and pan on instagram.

    Is there somebody that could point me to a possible solution? I really like the smooth movement of the cinemachine so i opted to go this route but my coding skills are not that good.

    Appreciate every help. Thanks in advance!
     
  2. GameChanger_Prajwal

    GameChanger_Prajwal

    Joined:
    Aug 5, 2020
    Posts:
    1
    hey dude i have the same problem as you did you find the solution?