Issues with collision mask (html5 game)

Hi again!

I started a new platformer game project but I have some problems.

In the game the player will slide on the floor pressing X to avoid spikes and other traps.

I created a custom collision mask for each animation but I found the event detects the collision even when it suppose the collision mask of this two objects aren’t in collision. Seems like the custom collision mask in the object “PlayerHitBox” does not work and take the default collision mask. Also, if I delete the collision mask of the object “New” the behavior is the same.

I have no clue about what is happening :confused: . Am I doing something wrong or is some kind of bug? (569 KB)

hi all : ),
I’m a new Gdevelop user and I’ve the same problem,
I made a "diamond " collision shape inside a sprite for an isometric collision, and it doesn’t work. it takes the full rectangular sprite as a collision box : /

any clue about that please?


can you give us a minimal project that reproduce the issue ?

Hi Victor : )

Yes of course,

You can download the Gdevelop file project + assets here

and I published a web version here

I modified a bit the shape of the mask in my test and the problem is a bit different now .
it seems to work on some parts but not everywhere, for the HTML5 version.
I tested it on Firefox/Chrome/Internet Explorer, there is the same problem.
but it works fine in the Native version preview. ( even if what i’ve done is far from perfect ^^ )

Thx in advance : )

Can you try to remove these two lines :

if ( x*x+y*y < obj1MinEdge*obj1MinEdge+2*obj1MinEdge*obj2MinEdge+obj2MinEdge*obj2MinEdge ) return true;
in GDevelop folder/JsPlatform/Runtime/runtimeobject.js (lines 1024-1025).

Then, preview your game and force a cache update from your webbrowser.

Thank you very much !

It works for the Html5 now in the preview : )
I suppose I’ll have to make a “Notice text” to explain to every people who are going to test it, to do "Ctrl f5 " to make it work .

mmm… question, do I have to put those lines back, for others projects ?

No, it will be fixed in the next version of GDevelop. :wink:

thx for your awesome work ^^ !