Playmaker Forum

PlayMaker Help & Tips => iOS Help => Topic started by: HaraldsVeiss on June 13, 2014, 02:28:09 PM

Title: Camera swipe?
Post by: HaraldsVeiss on June 13, 2014, 02:28:09 PM
Hello!

I am trying to make camera swipe like in most iOS games in level select menu. I can't really find any good way to do this without purchasing additional plugins e.c. Could someone point me in the right direction?

Best,
Haralds
Title: Re: Camera swipe?
Post by: poopdecksweeper on June 28, 2014, 03:47:01 AM
can you dl the free version of ngui?
Title: Re: Camera swipe?
Post by: Alex Chouls on June 28, 2014, 01:22:42 PM
Can you describe the desired behavior in more detail? I can't picture what you're trying to achieve...
Title: Re: Camera swipe?
Post by: HaraldsVeiss on June 29, 2014, 01:30:38 PM
Of course, I will explain in more detail.

I want to make level select menu, that slides from right to left and left to right using swipe gesture. I want menu swiping speed to be dependent from how fast player swipes on the screen.

Hope this shows what I meant better.

Best,
Haralds

Title: Re: Camera swipe?
Post by: jeanfabre on July 23, 2014, 06:41:54 AM
Hi,

 I have a "viewSlider" sample that does swiping ( mouse and touch ), I could not find it again on the forum, but I have attached it here.

This is modified a bit to take in account the speed when animating the view after your swipe release.

that's going to be the best starting point for you to experiment and get the behavior you expect.

 I would however also encourage that you seek an asset that does just that, cause the math involved in doing the animation based on the swipe speed is rather complex, I haven't looked properly at existing code, but if you find a solution that does exactly what you are after, I'll port it to PlayMaker for sure, just pm me or reference it here.

note also that this sample is showing a 3d point of view, but to get it flatten out, simply set up your camera to be flat and ortho and you are good to go for all your 2d UI needs.
 
 Bye,

 Jean
Title: Re: Camera swipe?
Post by: HaraldsVeiss on July 25, 2014, 01:47:15 AM
Hi Jean,

Thank you for your help! I will take a look at this and let you know if I will get the behavior that I am looking for.

Again many thanks for taking the time and help.

Best,
Haralds