I’ve noticed that for some (all?) objects in the “artwork” menu, when the box collider is chosen, the bounding box used for the collision mask is way outside the bounding box of the actual object depicted. Selecting the polygon collider remedies this, but in an earlier forum discussion (summer 2018) we established that the additional calculations needed for polygon can, as is to be expected, result in a performance hit. Also, the same discussion led to a request to make box the default instead of polygon (thank you for doing this!), but it defeats the purpose if box doesn’t work.
- the purple knight with collider polygon can get right up to the edge of the rectangle, but the blue knight with collider box stops some distance away. The gap is asymmetrical - on the other side, the blue knight can get much closer.
- the masks for Basic Shapes seem to work perfectly. Both triangles can move right up to the rectangle.
Here’s the demo project:
Hi @auntiel, the rectangular collider always borders on the edge of the image size. If for example in your image there is an empty area on which there is no picture, it will also be taken into collider. Therefore, you need to crop the image without leaving blank areas at the edges.
Hi @Ready, thanks for the quick response and for the helpful clarification of how ready determines the rectangular collider. Using the image boundary does make sense for a use case where minimizing calculations is a priority.
But the chess piece image in my example comes from the Ready artwork library so I do not have the ability to crop it directly. Other images in the artwork library have the same issue.
@auntiel! Yes, you are right, many of the images in the libraries were added a very long time ago and may have size problems if you use the rectangular collider. I don’t know how critical this is, since we haven’t had any feedback about this before. I think it will be quite difficult to edit all of them to add again.