2D Toolkit Forum
2D Toolkit => Support => Topic started by: hromoydron on March 12, 2013, 09:31:58 am
-
Hello!
I want to make a trigger from my Sprite.
I added rigid body and unity box collider. It's work.
But, as I understand, in sprite collection editor 2dtk have it's own collider. How can I make a trigger from 2dtk collider? how can I male a polygon trigger?
-
The sprite collection editor simply creates Unity colliders anyway, so you will be fine. Just remember, if you need to create polygon (mesh) colliders, make sure to create a cap in the sprite collection editor if you need to interact from the z axis, eg. click it, or otherwise need a closed volume.
-
May be it for my bad English, but I've still not understood yet, how can I make a trigger. In Unity Colliders I simply checked "is Trigger". But in sprite collection there isn't such option. What should I choose/check? or I can make sprite trigger only in code?
-
Once you have created the sprite, tick the "Is Trigger" checkbox on the collider. That's it. It should remember that setting.
-
Thanks, I understand my mistake.
-
In my scene if triggers collided they will stop immediately. If mesh trigger collide with box trigger (or box with box ) all is okay. But mesh with mesh overlaps each other a little.
Why can it be so?
-
Thats down to the Unity Physx system.
It does allow a tiny bit of penetration with mesh colliders, a bit more than with box colliders.
I've never needed to do what you're trying to here, but I would start exploring the physics settings in case one of them helps. Edit > Project settings > Physics.