I'm making a Tangram game, but I need to check if my triangle is inside an image made up of multiple triangles and other shapes.
I used the expression BBox in another game, but in this game it doesn't work, can anyone help me?
Sounds like one of those situations when thinking the opposite will get you started on a solution.
Check if it is NOT outside the area. "is overlapping" will use the collision polygon, BBox will use the whole square around your object.
Develop games in your browser. Powerful, performant & highly capable.
Sounds like one of those situations when thinking the opposite will get you started on a solution. Check if it is NOT outside the area. "is overlapping" will use the collision polygon, BBox will use the whole square around your object.
it makes sense, maybe I have to do an inverted calculation anyway
If both triangles are about the same size you could just check if their positions are about the same. For example abs(tri1.x-tri2.x)<8, and the same for y. 8 would be how close is ok.
Another idea is to check if all three corners of one triangle are overlapping the other triangle. You’d do that by adding an image point to all three corners and use the system condition “pick overlapping point”.