Advanced Collider Shapes


The custom collider shape feature allows you to define one or more shapes per sprite visually. The data isn't used by the actual runtime, but you can hook into the system to tell you when the sprite (and as a result the attached colliders) have changed. Please note that the system will not create the colliders for you - you will be responsible in doing that should you wish to create colliders.

  1. Select a sprite in the sprite collection editor. Switch the collider type to "Advanced" and switch to the "Collider" editor tab.
    img/adv_collider_1.png

  2. Double click to add a shape. You can create multiple shapes. Use Edit > Delete from the main menu to delete the shapes, normal Unity shortcuts to delete will also work (delete / backspace).
    img/adv_collider_2.png
    img/adv_collider_3.png

At runtime, the collision shapes for a sprite can be obtained from the tk2dSprite.CurrentSprite.customColliders array.