playMaker

Author Topic: Camera swipe?  (Read 1368 times)

HaraldsVeiss

  • Junior Playmaker
  • **
  • Posts: 66
    • View Profile
Camera swipe?
« on: June 13, 2014, 11:28:09 AM »
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

poopdecksweeper

  • Playmaker Newbie
  • *
  • Posts: 6
    • View Profile
Re: Camera swipe?
« Reply #1 on: June 28, 2014, 12:47:01 AM »
can you dl the free version of ngui?

Alex Chouls

  • Administrator
  • Hero Member
  • *****
  • Posts: 3205
  • Official Playmaker Support
    • View Profile
    • LinkedIn
Re: Camera swipe?
« Reply #2 on: June 28, 2014, 10:22:42 AM »
Can you describe the desired behavior in more detail? I can't picture what you're trying to achieve...

HaraldsVeiss

  • Junior Playmaker
  • **
  • Posts: 66
    • View Profile
Re: Camera swipe?
« Reply #3 on: June 29, 2014, 10:30:38 AM »
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


jeanfabre

  • Administrator
  • Hero Member
  • *****
  • Posts: 12342
  • Official Playmaker Support
    • View Profile
Re: Camera swipe?
« Reply #4 on: July 23, 2014, 03: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

HaraldsVeiss

  • Junior Playmaker
  • **
  • Posts: 66
    • View Profile
Re: Camera swipe?
« Reply #5 on: July 24, 2014, 10:47:15 PM »
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