Collision fail when multiple instances of same object

I was doing an example for another user, but then I find a strange problem.

collision_fail.rar (2.61 KB)

This project displays 10 blue boxes, each of the boxes at a random position. The project uses a custom cursor and when this cursor collides any of the blue boxes the window title may show “yes” and when not… well, “no”.

But it’s not working, sometimes it don’t detects any of the boxes, sometimes just 1 or 2, no more than that.

The project can’t be simplier. Can someone try this project and tell me if I’m becoming crazy?

Really?

Wow, this thing is really broken, will try to debug the collision code :astonished:

Cool, I’m not crazy.

Ok, the problem is the combo “Loop animation: true” + “Time between frames = 0”, don’t know why but surely has to do with the animation being reset every frame.

:exclamation: A division by zero right here: https://github.com/4ian/GDevelop/blob/master/GDJS/Runtime/spriteruntimeobject.js#L243

I see, I don’t even remember when I set those parameters that way, but it was driving me crazy.
I rebuild the example and it works, but I was fearing some similar anomaly to happen to my current main project.

Thanks for the help!