How do I make a bounding box for swipe scrolling

0 favourites
  • 3 posts
From the Asset Store
All popular touch mechanics - scrolling, zooming, swiping
  • Hey folks, I'm new here and just starting to play with construct 2. My first step was to make the UI.

    I followed a tutorial for swipe scrolling, .

    It works great, however I am trying to build a dynamic playable area. I have it set to Unbounded Scrolling, and want to use sprites to limit the movement of the "TouchFollowMe" sprite from the tutorial.

    However, after several attempts with such tools as Collision events, "Solid" behaviors, etc, I just can't get the "TouchFollowMe" sprite to make a full stop when it hits my "PlayArea" Sprite.

    Am I missing something?

  • I'm not familiar with the tutorial, but would using the clamp expression work to limit the movement?

    every tick

    touchfollowme set x - clamp(touchfollowme.x, minimum x-coordinate, maximum x coordinate)

    touchfollowme set y - clamp(touchfollowme.y, minimum y-coordinate, maximum y coordinate)

  • Try Construct 3

    Develop games in your browser. Powerful, performant & highly capable.

    Try Now Construct 3 users don't see these ads
  • Fantastic, thanks! Step 1 down, only 500 steps left to go...

Jump to:
Active Users
There are 1 visitors browsing this topic (0 users and 1 guests)