Ease In/Out Scene Scrolling

  • #1, by michael-furnissSunday, 23. October, 02:42 A month ago
    Hi all,

    I'm new here. Just getting a scene up and running for the first time.
    I've managed to get a side-scrolling scene  by finding a few useful posts in the archive of this forum, so thank you to the helpful community.

    I was curious if there was a way to have the scroll animation ease in/out.
    Currently it's a linear animation that starts and stops abruptly.

    Any help on this would be appreciated. 

    Thanks!

    Newbie

    2 Posts


  • #2, by esmeraldaSunday, 23. October, 11:51 A month ago
    Welcome!

    A scene larger than the resolution you set in the games properties should scroll by default when the playable character reaches the edge. No need to change anything.

    In the scene properties you can also check the box "scroll scene if the cursor is at the screen edge". The default setting is that the scene is centered on the character. So when you move the scene by moving the cursor to the edge, the scene will return to the character as soon as you move the cursor again. If you don't want this to happen, you need to clear the centering on the character. There is an action part for this, called "center scene on character permanently" with a checkbox to clear the centering.

    So that said I'm not sure what you did to scroll the scene. Do you have a first-person-game and used a script for scrolling?
    Then it is easy to add easing. If you are using the to() function, just add the easing at the end, like in this example.
    The first line is to clear the centering of the character, but that can be done with an action part as well.
    The 3000 is the time taken for scrollin in ms. The scene will scroll to the x positon of 1500 and the y position is kept the same.
    game.ScrollCenterCharacter = false
    game:to(3000, { ScrollPosition = {x = 1500, y = game.ScrollPosition.y} }, easeQuintOut) 

    Btw - the discord server is way more active than the forum. Feel free to join us there.
    https://discord.gg/AwcNqbjp

    Great Poster

    470 Posts

  • #3, by michael-furnissSunday, 23. October, 13:31 A month ago
    Appreciate the reply, esmeralda!

    Fortunately, I was able to find what I needed in the main game settings under 'smooth scrolling'.

    I have joined the Discord. Thank you for the invite.

    Newbie

    2 Posts

  • #4, by michael-nearSaturday, 12. November, 14:36 3 weeks ago
    Welcome!

    A scene larger than the resolution you set in the games properties should scroll by default when the playable character reaches the edge. No need to change anything.

    In the scene properties you can also check the box "scroll scene if the cursor is at the screen edge". The default setting is that the scene is centered on the character. So when you move the scene by moving the cursor to the edge, the scene will return to the character as soon as you move the cursor again. If you don't want this to happen, you need to clear the centering on the character. There is an action part for this, called "center scene on character permanently" with a checkbox to clear the centering.

    So that said I'm not sure what you did to scroll the scene. Do you have a first-person-game and used a script for scrolling?
    Then it is easy to add easing. If you are using the to() function, just add the easing at the end, like in this example.
    The first line is to clear the centering of the character, but that can be done with an action part as well.
    The 3000 is the time taken for scrollin in ms. The scene will scroll to the x positon of 1500 and the y position is kept the same.
    game.ScrollCenterCharacter = false
    game:to(3000, { ScrollPosition = {x = 1500, y = game.ScrollPosition.y} }, easeQuintOut) 

    Btw - the discord server is way more active than the forum. Feel free to join us there.
    https://discord.gg/AwcNqbjp
    I tried joining this Discord server, but I was unable to do so. I am getting an error message saying 'Invite invalid'. At first, I didn't understand what it meant. I understood what it meant after reading this article https://www.thewindowsclub.com/cant-join-discord-server-fixed. Could you please send me the correct link for joining this Discord server? Maybe the invitation link has changed now. Thanks. Waiting for your response.

    Newbie

    1 Posts

  • #5, by esmeraldaSaturday, 12. November, 15:55 3 weeks ago
    Ah yes, that must have been an invite for a limited time.
    If you scroll down, you see a yellow bar with "Visionaire Studio" on it. On the right side next to it are three round buttons for Facebook, Twitter and Discord. Click on the one on the right, that contains a permanent invite and leads you to the discord server.

    There is also a blog entry about the discord server (you should see it when in the forum in a top bar).

    Great Poster

    470 Posts

Write post