Stuttering movement with my platformer game

Hi everyone, I have a problem with a game that I’m making with defold for fun and for my toddlers, a simple platformer. I have a “stuttering” problem and I don’t understand what it depends on, I’ve been trying for weeks and it’s really frustrating…

I created 3 player scripts to do more tests, the player_base is mine, player_kin is instead an adaptation without fire and squish animation of the controller that can be found in the pixelline platformer example game itself by defold. There is a third for dynamic but it’s just worse…

I really don’t know what to do and I’m attaching the project here. Please help me!

To reproduce the problem try going left and right with A and D (W to jump) and you will see that suddenly the player seems to fall. If I wanted to change update to fixed_update I wouldn’t have the animation that suddenly falls but rather always stuttering…


sunnyproject.zip (3.8 MB)

1 Like

This is to do with how “on ground” detection works. I answered a similar question a while back on this thread:

4 Likes

hi, thanks for the reply! How can I implement this countdown for the ground detection? Any suggestion?

I tried a lot of solutions, I implemented a controller with platypus plugin and now is better. I suppose the problem with the script part is that when you don’t have the message of collision ending, you cannot set again easily when the ground contact will be false. this is why you have to set at the end of update always a reset value.