How to move camera position around the scene with touch?

reddotincreddotinc Member Posts: 653
edited November -1 in Working with GS (Mac)
Hey guys,

I've been searching high and low to try and find out how to do this but have only manage to found it for dragging an image around which isn't what I'm looking for. Think Angry Birds, being able to "drag the scene" to view what is off the screen to the right. That's the solution I'm looking for.

I'm sure a lot of people would like to know how to do this, so would be great if someone could share the wealth :)

// red.

Comments

  • PhoticsPhotics Member Posts: 4,172
    You didn't buy the textbook, did you? :)

    You have to mess with the camera attributes, but those are scene attributes, so do it from an instanced actor in the scene.
  • Rob2Rob2 Member Posts: 2,402
    you have to deal with the initial offset (unless you like the jump!) but constraining camera origin to touch works.
  • reddotincreddotinc Member Posts: 653
    Photics said:
    You didn't buy the textbook, did you? :)

    I was one of the first actually! :P

    I'll have a look through again to find it :)

    // red.
  • RHRH Member Posts: 1,079
    Here is what I put on an actor called camera, size 480x320:

    image

    image

    I'll upolad the game as soon as GS lets me! [ It currently won't log me in via the GS application].
  • reddotincreddotinc Member Posts: 653
    RH said:
    Here is what I put on an actor called camera, size 480x320:

    I'll upolad the game as soon as GS lets me! [ It currently won't log me in via the GS application].

    Thanks dude! So It's just a case of layering it correctly then so it doesn't override any actors that need toch controls?

    // red.
  • RHRH Member Posts: 1,079
    reddotinc said:
    Thanks dude! So It's just a case of layering it correctly then so it doesn't override any actors that need toch controls?

    // red.

    I guess it's just up to the user to make sure they don't interact with the other actors that require touch. You may want to add in multi-touch ability and I didn't take in to consideration the edges of the scene so the camera actor doesn't stop moving at the edge.
  • reddotincreddotinc Member Posts: 653
    Would be nice to be able to "flick" the scene across for easy panning like on AB! :)
  • scitunesscitunes Member, Sous Chef Posts: 4,047
    reddotinc said:
    Thanks dude! So It's just a case of layering it correctly then so it doesn't override any actors that need toch controls?

    // red.

    On the other actors that receive touches have rules that say

    Rule when touch is pressed
    ----Rule when touch count = 1
    --------Do blah blah blah

    Then have your camera controls like this

    Rule when touch is pressed
    ------Rule when touch count = 2
    -----------Camera controls
  • tenrdrmertenrdrmer Member, Sous Chef, Senior Sous-Chef Posts: 9,934
    reddotinc said:
    Would be nice to be able to "flick" the scene across for easy panning like on AB! :)

    Good luck finding some help with this one. I searched and searched and asked on the forum and no one could offer help with anything like this. I wanted to be able to swipe up and down to scroll through instructions and stuff so they could all be on one scene. Pls let me know if you figure anything out.
  • reddotincreddotinc Member Posts: 653
    tenrdrmer said:
    Good luck finding some help with this one. I searched and searched and asked on the forum and no one could offer help with anything like this. I wanted to be able to swipe up and down to scroll through instructions and stuff so they could all be on one scene. Pls let me know if you figure anything out.

    I WILL figure something out ;) .. I'll let you know!

    @scitunes thanks dude, but I want the camera movement to be single touch, I've set up the layers well now :)

    // red.
Sign In or Register to comment.