Search Unity

Camera movement with inertia - like ScrollRect

Discussion in 'UGUI & TextMesh Pro' started by MarkOfVarberg, Sep 3, 2014.

  1. MarkOfVarberg

    MarkOfVarberg

    Joined:
    Sep 5, 2013
    Posts:
    11
    I love the new ScrollRect with inertia - it feels very much like the swiping movement on iPhone. It just works - both with mouse in the editor and on device.

    I would like to apply the same ability to the movement of the camera horizontally in my game.

    Is there a way to do this right now?
    Is there anything like this coming to uGUI?
     
  2. runevision

    runevision

    Joined:
    Nov 28, 2007
    Posts:
    1,892
    There is nothing like that planned, no.
     
  3. MarkOfVarberg

    MarkOfVarberg

    Joined:
    Sep 5, 2013
    Posts:
    11
    Damn! :D

    Ok - well I was originally handling the swiping with a rigidbody on the camera but I'm not happy with the inertia or the swiping control, which doesn't quite keep up with the finger.

    I will dig into the ScrollRect code and try to get it adapted. But then I would need an image component "background swiping layer" at the bottom of the hierarchy to receive the swiping events and then everything above it will work as usual I guess?