Camera shaking during collisions

I have an simple object with helper object (red rectangle) used for terrain collision detection.

My camera is also following the helper object

And I also have a simple “dash” action, which is made using this event

The problem I have is that the camera is not centered correctly when the object is colliding with other object and a permanent force is being applied to it. You can see that the helper object is staying in place, but the camera is probably predicting the movement?

Example below (you can clearly see the jump looking at the cursor):

Any idea how I can fix this?

What order are you doing these events? It should be moving all the objects first, and the last events should be focusing the camera on an object.

Also, why are you moving the collision object towards the player? It should really be the other way round. The collision object should be used to determine the player’s position, and the player object is used just for the visuals.

Wow. I don’t understand how, but moving camera center event to the end of event list managed to fix this issue. I thought that the camera center event is working continuously and independently of other events when no conditions are specified but I was wrong.

GDevelop runs through the event sheet from top to bottom, processing actions from first to last in each event. The order you do thing in is important.