Collision shapes not working

Jaageri

  • Posts: 9
I have a problem with collision shapes. I deleted the box collision shape and made a polygon collision shape. But when I click on the polygon shape a box shape appears around it also. So when actor collides to the left side of my igloo the collision can happen in the empty space in the top left corner ( see picture two).

Luyren

  • *
  • Posts: 2817
Have you actually tested your collisions are happening as a rectangle instead of your polygon's shape?
My Stencyl resources are available here: https://luyren.itch.io/
Cutscenes, RPG Elements, Particles, Map System and many more.

Jaageri

  • Posts: 9
Yes I have tested and the collision happens in the rectangle so right now the polygon shape is useless. How can I fix it?

Luyren

  • *
  • Posts: 2817
Clicking the polygon always shows the full rectangle on top of the polygon as a selection area. That's only for display purposes within that window, it has no real effect on the actual collision boundaries. In other words, I cannot replicate your issue. You can check the collision bounds in-game by going to Run > Enable Debug Drawing. If there is an actual rectangle box, its origin lies somewhere else.
My Stencyl resources are available here: https://luyren.itch.io/
Cutscenes, RPG Elements, Particles, Map System and many more.

merrak

  • *
  • Posts: 2738
Make sure the vertices are defined in counter-clockwise order.