Touch and drag a large level

TobyToby Member Posts: 478
edited April 2012 in Working with GS (Mac)
Having an issue where dragging to see the rest of the game screen does not work for me.

I've put an actor in the scene and set the camera to follow this actor.
On touch the actor will move in the Y position only toward the touched Y coordinates.

The problem occurs when the playfield is larger that 1024 (3000) in height. Movement of the actor only seems to move between 0 > 1024 even though I'm touching well above that area.

Why will it not move beyond 1024?

Ideas, or am i just going about this all wrong?

Answers

  • JohnPapiomitisJohnPapiomitis Member Posts: 6,256
    edited April 2012
    you need to add an offset for the camera

    One way is to unlock the actor that has the control camera behavior so you can gain access to scene attributes.

    Then in your constrain for the mouse position, constrain self position y to mouse.position.y+camera.origin.y
Sign In or Register to comment.