IOS screen

DreamLabDreamLab Member Posts: 2,127
edited November -1 in Working with GS (Mac)
I am making a game to where one object is in front of me, I do what I need to do with it, then swipe it off screen(and while it is going off screen, I want another actor to come on screen) and so on and so forth. Please help or point out a demo. I have been unable to find a demo and I've been stuck at this for a couple days. Thanks
DL

Comments

  • DreamLabDreamLab Member Posts: 2,127
    any help is appreciated. Trying new things but nothing is working out. PLEASE HELP! thanks
    DL
  • HachikoHachiko Member Posts: 330
    Really no time to make a template, but there are different ways to approach this.
    You can look at the vector that is created from the finger of the user:
    If mouse is down then
    change attribute game.startMouseX to mouse.x
    change attribute game.startMouseY to mouse.y
    otherwise
    swipe = vectorToAngle(game.startMouseX-mouse.x, game.StartMouseY-mouse.y)
    this will give you an angle, from 0 to 359 or 360 (can't remember now) where 0 if I'm not mistaken means -> right
    so you do
    if swipe > -45 and swipe < 45 then swipe is right
    if swipe >=45 and <=135 then swipe is up
    and so on.
  • DreamLabDreamLab Member Posts: 2,127
    Ok thanks. I'll give it a try. Hopefully it works.
  • DreamLabDreamLab Member Posts: 2,127
    Is there a way to make it once swiped, snap to a grid? Like if I were to swipe the screen, it would automatically come in and stop?
  • DreamLabDreamLab Member Posts: 2,127
    I had a thread on this subject, but I have a more clear objective. I want the slide actor to be like the IOS screen. One goes off screen and one comes in. But I want it to snap to a grid(Like the IOS screen). Please don't close this because its like my other thread. I am hoping people understand more of what I am talking about. If anyone knows how to do this, please tell. Thanks.
    DL

    ***I merged the topics. Makes more sense - QS :D***
Sign In or Register to comment.