Hi, so this is infuriating. I’ve got a simple tile collision with a circular sprite. Here’s my update and collision handling functions, almost the exact same as the Platformer tutorial:
The order of functions called per frame goes like this: update(), on_message() for collisions, then collision_tile() to deal with the actual collisions:
It’s working fine and the player is correctly grounded while standing on the tile, however every 32nd frame, the update() function gets called twice instead of just once, as you can see in the last screenshot. That 32nd frame I guess skips out on sending a contact_point_response message and therefore switches the player’s state to “not grounded” for a single frame, causing a flickering in debug mode and some other annoying issues. Any idea as to why this is happening? The collision response code is working perfectly, without floating point errors or anything. It’s just that 32nd frame…