• Hello [name]! Thanks for joining the GMC. Before making any posts in the Tech Support forum, can we suggest you read the forum rules? These are simple guidelines that we ask you to follow so that you can get the best help possible for your issue.

Sprite collision mask problem

M

mjadev

Guest
Hi,
I'm starting to use the new GMS 2.3 version and I have a basic problem with Sprite collision mask : it seems that collsion mask size is 0x0 !

When I create a new sprite (default 64x64), the collision mask is set to Automatic/Rectangle but the size of the collision mask seems to be 0x0
If I affect the sprite to an object and I add the mouse event "left pressed" for example, nothing happen
In automatic mode, when changing the collision mask type, the collision mask shape is not updated in the display window.

The only way to activate the collision mask, is to set the collision mask to "Manual", then manually extend the size of the mask to the sprite size
And after that, when I go back to automatic, I can change the mask type and the mask shape is updated correctly.

I didn't use GMS2 for a while but I do not remember that it was the case before

IDE 2.3.0.529
Runtime 2.3.0.401
 

Biscotto

Member
Is the sprite you create an empty sprite? If the answer is yes, you have to use a manual collision mask, because in automatic GM cannot find anything inside your sprite (this is because your sprite is empty).
The automatic option only works if you have drawn something inside your sprite.
 
M

mjadev

Guest
thanks for your answer
yes I have drawn something so my sprite is not empty

here is my method:
1/ create a new sprite with right click in asset tree (so the sprite is empty)
2/ edit the sprite and draw something

At this point, the collision mask is still set to automatic (default value) but it has not been updated to what I have drawn
If I change the mask type, the mask is not changed.
If I switch to Full Image, still no mask
If I switch to manual, I can see that the mask size is 0x0 and I can change its size... after that, switching to automatic works normally. I can even edit the sprite and, if "precise" type is selected, the mask is updated.

I also tried to import an existing sprite from another project (.png) and it is working as expected
 
M

mjadev

Guest
I have done more test and it seems to be a regression in 2.3

I have tested same on my laptop where I have GMS 2.2.5
Doing same steps than I describe in my previous post and collision mask is set correcly
Then I have updated to GMS 2.3 (same than on my desktop) and I can reproduce the same problem I described
 

Biscotto

Member
Could you post your sprite? I would like to do some tests.
I'm asking because personally I've never had this problem using 2.3, and I'd like to understand what's wrong.

However, it could be a 2.3 bug, in case you could submit a bug report, and a GM technician will confirm whether or not you have this problem.
 
M

mjadev

Guest
for the sprite, as it was for a test, I just drew a 'potato' and used the paint tool to fill the inside
it's not specifc to this sprite because I can reproduce the bug with every 'potato' I drew (I attached one to this message)

I will submit a bug report
thanks for you help
 

Attachments

Biscotto

Member
Very strange .... I just did a test and the automatic collision mask is created correctly.
- I tried to draw a "potato" and fill it with the bucket tool. Once back in the Sprite Editor, the mask was self generated correctly.
TestSprite.png

- I tried to import your sprite, and the collision mask was generated immediately (and correctly).
TestSprite2.png

However, we are waiting for the answer from GM's technicians (they should answer you within 48 hours). Let me know! ;)
 
M

mjadev

Guest
strange indeed for the 1st test

for the 2nd test, same at my end : when an import a sprite (even this one), it's working
 

S_Kleer

Member
Hi,
I'm starting to use the new GMS 2.3 version and I have a basic problem with Sprite collision mask : it seems that collsion mask size is 0x0 !

When I create a new sprite (default 64x64), the collision mask is set to Automatic/Rectangle but the size of the collision mask seems to be 0x0
If I affect the sprite to an object and I add the mouse event "left pressed" for example, nothing happen
In automatic mode, when changing the collision mask type, the collision mask shape is not updated in the display window.

The only way to activate the collision mask, is to set the collision mask to "Manual", then manually extend the size of the mask to the sprite size
And after that, when I go back to automatic, I can change the mask type and the mask shape is updated correctly.

I didn't use GMS2 for a while but I do not remember that it was the case before

IDE 2.3.0.529
Runtime 2.3.0.401
I confirm. The same problem.
 
M

mjadev

Guest
answer received from Yoyo support : this issue was already in their database... just need to wait for a fix now
 
Hi,
I'm starting to use the new GMS 2.3 version and I have a basic problem with Sprite collision mask : it seems that collsion mask size is 0x0 !

When I create a new sprite (default 64x64), the collision mask is set to Automatic/Rectangle but the size of the collision mask seems to be 0x0
If I affect the sprite to an object and I add the mouse event "left pressed" for example, nothing happen
In automatic mode, when changing the collision mask type, the collision mask shape is not updated in the display window.

The only way to activate the collision mask, is to set the collision mask to "Manual", then manually extend the size of the mask to the sprite size
And after that, when I go back to automatic, I can change the mask type and the mask shape is updated correctly.

I didn't use GMS2 for a while but I do not remember that it was the case before

IDE 2.3.0.529
Runtime 2.3.0.401
This happens to me too
 
Top