Swipe+camera

FeluciFeluci Member Posts: 35
edited November -1 in Working with GS (Mac)
Hello,

I just started using Gamesalad and i have a question.
I made a 1024x1024 map. A player cant see the whole map because it's to big. i was wondering if it's possible to create a rule that when the player swipes left/right/down/up the camera moves over the map. If so please tell me how

Thanks alot

Comments

  • tenrdrmertenrdrmer Member, Sous Chef, Senior Sous-Chef Posts: 9,934
    I believe you can constrain the camera to the touch position but that would create a jump in the camera when you touch. try looking through the cookbook videos there is one abut a multiscreen menu that you can swipe through so it can prob be adapted to go more than left and right.
  • AquariusAquarius Member Posts: 282
    U mean like google maps street look and the like?

    Maybe create gestures instead of constraining the camera to the touch?

    Theres a video on how to swipe in the gamesaladcookbook. Go check that out and start tweakin'!
  • simo103simo103 Member, PRO Posts: 1,331
    if you open GS and in the New+ areas search 'background drag' . then double click the resulting template you can see a possible solution to what you are asking .. I think.
  • AsymptoteellAsymptoteell Member Posts: 1,362
    Instead of constraining it to the mouse position, change two attributes, offset X and offset Y, to cameraoriginX-mouse.position.X and camera.origin.Y-mouse.position.Y. Then constrain the camera origin to be mouse position X-offsetX and mousepositionY-offsetY. That way you won't have the jump.
Sign In or Register to comment.