Scaling Platformer Object Jittering

Hello. In my game, I have a platformer object that will get smaller over time until it has shrunken down to nothing, in which it then deletes itself. However, when the object shrinks, it jitters up and down as if it’s doing tiny jumps. Obviously, I don’t want the object to jitter when shrinking because it looks weird.
Is there something I can do to prevent the jittering?

Thanks in advance.

I think this has something to do with the position,
As you scale down or up, an object, its position also changes. Try doing, changing the position of your object to the position of the last scale of your object. Hope this helps

How would I do that? Like what’s the code?

Also, keep in mind that it’s a platformer object, so it’s affected by gravity.

Would you mind posting your code here?

The code is right at the bottom of this event sheet

I recommend making a backup of your game on this one.

I think deleting the scale action and replacing it with an animation of your object, scaling down,can solve your problem. Make sure the size of your animation canvas is the same with your selected object

Thanks, but this special object has 4 different animations, which are picked randomly for each object, and each animation will take up a lot of storage space for an object that does something so minor in my game.
What was that thing you said about position earlier? Do you think it would work with my code or not?

Wait, I think I just found the problem with your code.

In the bottom part of your code (at the variable Bounce of ShatterShard is Greater than or equal to 2) , add this action, set the jump speed to 0.

Hope this helps :slight_smile:

It didn’t work. The jittering is still present.
I decided to experiment with my other platformer objects to see if they jitter when shrinking as well. Sure enough, a few of them did jitter, but the rest of them for some reason are not jittering at all when they shrink!
I wonder if this has something to do with hitboxes. I DID edit the hitbox of the object of focus here. It’s sprite is 16x16, but I changed the hitbox size to this:
X: 3, 13, 13, 3 and Y: 3, 3, 13, 13
What are your thoughts? What should I try now?

Try to change the oringin point y of your ShatteredIceShard to the bottom part.
If the origin point is on top, each time it scales down, it has to fall to hit the platform causing the jittering.
Changing the y origin to the bottom, it will scale from top to bottom and the sprite will be always touching platform.

No good. I put the origin point at the way bottom, but it still jitters.
Note: The origin point was originally in the middle.

Don’t wanna resurrect this topic but I was having the same issue and using something like a hitbox and setting the sprite’s origin point on hitbox may solve this issue by setting the sprite’s position stable. More work needs to be done but this is the only thing I can think of.