[Solved] Physics Engine - Issue with collisions between Dynamic and (Polygon) Static Object

Dear all,
I’m a new user of Gdevelop, so probably this kind of issue has been already solved; however I didn’t find any topics which helped me on this.

Here is my problem:

A ball (Behaviour Physics, Type Dynamic, Shape Circle) is “launched” toward the mouse pointer with a certain amount of force (i.e. 15).
The terrain is randomly generate and is composed basicaly by three different elements: plain (Behaviour Physics, Type Static, Shape Box) slope up (Behaviour Physics, Type Static, Shape Polygon) one slope down (Behaviour Physics, Type Static, Shape Polygon).
For Slopes I set up the 4 vertex to define collision area

The behaviour of the ball properly works on plain element but not on slope ones. The ball after some “bouncing” fall down through the element

Since Im not sure I was clear enogh, in case is useful, here below you can find the file in which you can “test” what I have just describe.

[TwoMinutesStriker - Google Drive]
use SPACE BAR to restart the level (and regenerate the terrain)
use LEFT MOUSE to launch the ball

Thanks in advance to anyone could help me.

Check your hitboxes, they’re not right.
image

1 Like

I amended them and now they work fine. In additon for TERRAIN_03 a set up as “Center” as Polygon Orgin instead of “Origin”.

Thanks a lot, really appreciated.

1 Like