For some reason 2d collision detection in unity for colliders and triggers is implemented slightly different.
void OnCollisionEnter2D(Collision2D coll)
void OnTriggerEnter2D(Collider2D other)
Collision2D has a clear straightforward way to obtain collision points via Collison.contacts . Unfortunately there is no such easy way to do it for Collider2D.
My first attempt was to modify spine runtimes for unity. The class that generates a unity trigger for bounding box is BoundingBoxFollower . But just switching true to false on line 135 by
(var collider = SkeletonUtility.AddBoundingBoxAsComponent((BoundingBoxAttachment)attachment, gameObject, true))
seems not to be enough. (i just made it following this great video tutorial
VIDEO
). So my questions are:
1) Is it possible to get the exact contact points for bounding box attachment?