How do I Stop Jerkiness of Scroll To behavior?

0 favourites
  • 5 posts
From the Asset Store
All popular touch mechanics - scrolling, zooming, swiping
  • So I have this character for my platform game and it has the standard scroll to behavior. It also has a run animation however each of the frames are different sizes so the changing sizes of the frame causes the scroll to behavior to be bumpy as it follows the player. How can I fix this or add a custom scroll to behavior?

  • Set the origin in each frame on the same place.

  • 99Instances2Go I tried that but it didn't change anything

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • I would recommend making a "camera" object that the layout follows, rather than the character itself.

    You can the set the position of the "camera" object;

    Camera.X = lerp(camera.X,player.X,1-0.2^dt) : Change the 0.2 for a different speed (value between 0 and 1)

    Camera.Y = lerp(camera.Y,player.Y,1-0.2^dt) : Change the 0.2 for a different speed (value between 0 and 1)

    This will make the camera follow the player with a little bit of "smooth lag", and may fix your issue

    ~Sol

  • Still.

    Better solve the cause. If the problem is what you allready dedected. Then i wonder if you let Construct decide over the Collission Polygones when you imported the frames. That is a bad habbit. You should check and make the polygones yourself. Or use a plain invisible sprite for the collisions and pin the animated player on it.

    It is is not a good idea too to animate the collision poligones.

    It is not a good idea to have differend framesizes for each animated frame.

    To make all frames the same size. Find the frame with the biggest size in all animations. Note down the width & height. Choose any other frame. Click the 'size' button. Put widht & height in. Image: align center. Check the 'apply to whole animation' thingy. Do for all animations.

    To set the origin the same for all frames. Right click the origin in the list of imagepoints. Choose apply to all animations.

    To set the same polygones to all frames. Choose a frame. Set the polygones to your liking. Right click the sprite (with th poligones visible). Choose set to whole animation.

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