How do i make a U shape as a collision mask? Im guessing using more masks, but i dont get how, i cant add masks in physics2
1 Like
As far as I know, the Box2D physics implementation doesn’t support multiple polygons on the same object.
To make a U shaped mask you’d have to have 3 separate objects that are pinned to one another (one for the bottom of the U and one for each side).
1 Like
@Silver-Streak’s answer is correct. But I’ll explain it in more detail. Add hinges at the points that need to be adjusted in the places where you want to glue the objects together. This should work.
I’ve noticed that another engine uses Matter.js instead of Box2D.
Maybe I’ll try to create physics using Matter.js because it’s more stable.