Edge Scrolling Nuance

0 favourites
  • 2 posts
From the Asset Store
On the Edge is a puzzle game where you have 40 levels to have fun with.
  • More testing of concepts.

    I made a side scrolling platform with edge scrolling.

    docs.google.com/open

    I used two objects (visible in the CAPX) that are invisible, rightEdge and leftEdge.

    When you scroll over them the screen scrolls right or left.

    This works perfect.

    What I want now is for the scrollRate to increase the closer you are to the edge.

    You will see my formula in the function but it does not work.

    Any thoughts on my logic?

    Thanks for the help!

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • I havent looked at your capx but Im just thinkin of how Id do it:

    Say 100 is the max distance from the edge you want to start scrolling. 100 - the current distance from the edge clamped between 0 and your max speed then scroll by that amount.

    As you get closer to the edge the distance will decrease and less value will be subtracted from 100. Using that value will make it scroll faster. Pretty simple

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