O
O
OnGBR12020-07-20 12:06:55
Unity
OnGBR1, 2020-07-20 12:06:55

What if the collider is larger than the object?

I know that you can edit the collider, but I have too many objects, especially since they are of a complex shape.
I use PolygonCollider2D,
On the 1st picture you can see that the created collider is larger than the object
5f155de884d2c777247505.png

On the 2nd picture, what I want, the collider is normally attached to the object
5f155e56c4621178507601.png

How to make the collider, when created, automatically be no larger than the object?
PS I searched on the Internet, but did not find anything sensible

Answer the question

In order to leave comments, you need to log in

1 answer(s)
A
Andrey Boronnikov, 2020-07-20
@OnGBR1

This problem is related to sprite recognition algorithms for generating complex colliders - so no way.
In this case, it is better to generate a collision from simple, even if there are several colliders. Because it will be very useful for optimization.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question