Super Mario World Style Camera

0 favourites
  • 5 posts
From the Asset Store
9 orchestral + 9 alternate chiptune-style arrangements of dynamic, RPG-style music for your media project.
  • I have been having trouble making this type of camera. I settled for a while with a lerping cam and it’s super jarring when you change directions and doesn’t move fast enough when the character moves fast.

    I really want something like this video:

    https://youtu.be/TCIMPYM0AQg

    https://media.giphy.com/media/xqTHyT5TmwrdK/giphy

    Does anyone have experience with this type of cam? I like the idea of wiggle room when switching directions. <img src="{SMILIES_PATH}/icon_e_smile.gif" alt=":)" title="Smile">

    Thank you <img src="{SMILIES_PATH}/icon_e_smile.gif" alt=":)" title="Smile">

  • Bump. I am still struggling with this type of camera. I believe I need the windows current position.

    Thank you.

  • There is a lot going on with the SMW camera (that's why it's design is so good, and hence the video).

    To start, you can use an invisible helper "camera" sprite with the scroll to behavior (I'm guessing you already have this part).

    After that, it is just a matter of setting target positions relative to the player sprite. You might want to make use of the lighttween or moveto plugins. A simple lerp over time should do fine as well, as long as you use it properly.

    To move over time at a constant rate without plugins, do not lerp using a dynamic origin based on the position of the sprite:

    You'll need a set of variables to store the originx and originy when you change states (facing left, facing right, flying, swimming ect.). I recommend using a second invisible sprite as the "target". The target does not move over time, it is positioned instantly and is always a set distance away from the player depending on the current state .

    Use a timer behavior to determine how long you want it to take the camera to get to the target position. This timer will be triggered upon changing states.

    Then you will lerp(originx, targetx, object.timer.CurrentTime/object.timer.Duration) and likewise for y.

    Upon the timer expiring (onTimer condition), you can simply pin or set the camera position to the target position.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • I've implemented similar stuff.. as seen here: https://twitter.com/SpectreSkully/statu ... 1744829440

    That might give you an idea on how you can set it up

  • thanks oosyrag and prominent!

    This gives me insight on how I can address this situation. Your animation prominent look right up my alley. Thank you.

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