Sprite collision

The orange Sprite1 squares should change color when they collide with Sprite2. But some change color even though they are far outside, and some inside don’t.

It has nothing to do with the amount of squares, how they are created, with the grid or the movement. Also swapping the objects in the condition or using a for each event doesn’t help.

Try adding a “For each object” and make it “Repeat for each Sprite1”

I dont think this is a bug, its just a logic error.

Do you have more events? or is that it?

There are no other events, no custom object size,…
But now I created it again in a new scene and it works, even without a for search object.

Then I checked the collision mask of Sprite2 and saw this, although I didn’t create any collision masks.

It doesn’t really explain the result, which is not a clean rectangle.

But it could have happened because of the new feature that automatically creates a collision mask based on the sprite content + exchange the resource graphic file without adding it again in GD.:thinking:

Thats weird… but glad you worked it out :slight_smile:

1 Like

Okay, that’s definitely a bug.

-Add a Sprite Object
-Add two animations with a different size
-Check the collision masks and you will see that the mask from animation #0 is always shared across all animations.

Pretty sure thats not a bug, its intended.

The first animation will set the “automated” collision shape.

If you want to have different collision shapes in different animations or frames, you need to select the create a custom collision mask button and then change the settings to not share the same mask for all animations.

This all works fine, i just checked.

I just tested it in an older version (5.2.167) and it wasn’t like it is now.
If that is how it is intended, then okay.