Move by touch and scrolling scene

tmagamestmagames Member, PRO Posts: 4

I have a hero character that I move by touch which works fine on a normal scene size however when I extend the scene size and have the actor (or any other actor constrained to me hero) control the camera my touch control is not accurate, ie: I can move my finger away from the hero and it does not move with it?

Comments

  • RowdyPantsRowdyPants Member Posts: 465

    @tmagames Hard to know. Need to see your logic on this one. Post screenshots of the rules and we can try to help.

  • ArmellineArmelline Member, PRO Posts: 5,358

    It might be this, but it's hard to tell from your description: When the screen scrolls, the location of your hero scrolls with it, but the location of your touch does not. The touch is always 0-768 on the x on an iPad scene. Even if your camera is located at 5000 on the x. So you need to work out how far the camera has moved (scene.camera.origin.x) and take that into account in your calculations.

  • tmagamestmagames Member, PRO Posts: 4

    I have tried two versions of touch/move as I needed an offset so the finger did not cover the grapics, but either way the same thing happens: if I stay within the confines of the screen the touch remains on the "hero" and moves accordingly. But if I try to scroll to the left or right of the larger screen the touch moves away from the "hero" which does not follow.

Sign In or Register to comment.