- Home /
Unity2d(mobile) Drag level screen left/right
Hello and thank you for clicking on this. I have 80 levels, and they are divided in 4 groups of 20.
What I want to achieve is for the player to drag the scene left and right to bring into frame the group of levels he wants to play. Do you see what I'm saying?
I hope you understand the picture attached
Thank you a tonnnnn
i have a same problem please tell me how did y this ? :-(
Answer by abi-kr01 · Feb 06, 2015 at 05:06 AM
considering you are doing it for mobile devices... you can use the pugin called Touch Kit
its free plugin which will take care of all the touch related problem like ,pinch zoom,dragging ,rotate with one finger etc
but if you dont want to use this plugin you can always use something like input.touch function where can put the difference of touch start and touch end to camera pos if user move finger in x -, you can put that difference in camera x same goes for y .
if its for web/pc you can use onmousedown and onmouseup difference
Then you just try touch kit follow the link and click download zip on middle rit .
Answer by SergeiKu · Aug 21, 2017 at 11:23 AM
You can create a scrollview. In container you add the yours levels. try this https://unity3d.com/ru/learn/tutorials/topics/user-interface-ui/scroll-view
Your answer
Follow this Question
Related Questions
drag a UI panel keeping it with the screen bounds 2 Answers
getting world coordinates of mouse position 2 Answers
GUIkit black screen 1 Answer
Should I follow this tutorial? Unlockable lvl. screen 2 Answers