Problems with animation speed for plataform behavior

Super bizarre. Playing with the project, it seems somehow tied to max speed too, as increasing that makes it never leave the first frame, even with trigger once. I mentioned it to @davy on the discord since he’s had the most involvement with the platform behavior, to take a peek.

“Is moving” is true only when characters walk more than 1 pixel per frame. This is not great, the condition should probably put the limit at 0 instead.

In the project shared by JovenOculto, the walk speed is 60 per second so 1 pixel per frame in theory but frame rate is not completely constant. The character can move less than 1 pixel one frame and more than 1 pixel an other frame. This is what causing the animation to restart in loop every 2 or 3 frames.

I will try to make a PR to fix the issue in a few days.

4 Likes

so it looks like that i´m, once again, the only one in the world with this issue T-T I have like some kind of superpower to find bugs or to produce very unique problematic behaviors on everything, maybe I should start looking for a plan B just in case?

Why? You have a work around to your issue.

1 Like

wait, THIS WORKS! thanks a lot :smiley:

sorry, for some reason I had not seen that message

1 Like

Another way to work around the issue is to fake your resolution. scale your assets up 3x their current size, set the resolution to 3x it’s current size, then set your speed to 3x its current speed. Everything will appear the same to the player, but since it’s actually moving faster/a larger distance it won’t experience this issue.

Davy also mentioned he’s going to look into a fix, but that may take a while, so either MrMen’s solution or the above will assist.

Note: Bumping your resolution up has other positive effects, too. Your camera, player movement, and anything that scales will move smoother (since there’s more pixels to work with).

1 Like

I’ll keep that in mind, although initially I’m trying to get a real old game feeling, so that smoothnes can be counterproductive in this aspect

I submitted a PR. It might be in the next release if it’s accepted.

2 Likes

sould I agree the [SOLVED] “tag” to the subject?