- Home /
Question by
TonyConception · Oct 28, 2017 at 10:41 PM ·
colliderdetectionborder
Detect object borders to add collider
How a game objetc's border could be detected in order to add a collider? The picture below is from my Unity's Scene and Game views. I added a trail renderer on an empty gameobject and moved it so the trail showed a simple shape:
As can be seen in the left scene side, the "selection outline" gizmo is perfectly drawn around the object, even when the trail cross itself. Id like to detect (or re-generate) those positions to configure an edgecollider2d. I found some explanation using shaders but it's too advanced for me.
I'd appreciate a lot if anyone could provide a guidance or code to help me. I'm also considering paying for this help if anyone is interested.
Thanks in advance.
border.png
(59.4 kB)
Comment
Your answer
![](https://koobas.hobune.stream/wayback/20220612142045im_/https://answers.unity.com/themes/thub/images/avi.jpg)