• Editor
  • Spine - Unity3d Bounding box

Im currently developing 2d fighting game using spine, unity and 2dtk, I got little problem when importing the bounding box added spine character in to unity. Spine bounding boxes are not appeared in the correct positions. could you please give me some advice to get rid of this problem

Cheers
praveee...

Related Discussions
...

How are you creating the bounding boxes in the Unity side? It may be easier to use BoneComponent (see GitHub pull request) and attach colliders that way.

Ok, it looks like triangulation didn't work so well. I think Rob/ProudLittlePinwheel from that thread mentioned the his triangulation doesn't handle concave polygons. 🙁

The way it would work with BoneComponent is you would create a GameObject, add the BoneComponent, and specify what a bone for the BoneComponent. The BoneComponent keeps the GameObject at the bone position. Now you can add a collider to the GameObject and the colliders will be in the right place as the bone transforms. You'd then do hit detection using the colliders. This is a bit simpler than bounding boxes, though it has the downside that the colliders are not Spine attachments, so can't as easily be changed during animations.

I checked the BoneComponent method and it seems to be a simple and good for my problem.
thanks 🙂