You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I just started using Spine and ran into a few issues. I'm using cocos2d as my game engine.
Is there a way to detect touch on a specific part of the skeleton. For eg: If I wanted to detect if the touch was only on the torso or the head. How would I go about doing that?
Also is there a way to change the texture that is drawn on a bone at runtime. For eg If the user touches the torse change the texture to something else?
The text was updated successfully, but these errors were encountered:
You can use RegionAttachment_updateQuad to get the vertices for a region attachment. You can then use a polygon-contains-point algorithm to determine if a point is inside the region attachment. You can iterate the slots on a skeleton or use the Skeleton_getAttachment* functions to get the region attachments. See CCSkeleton draw().
You can change the attachment using Skeleton_setAttachment.
FWIW, the forums are a better place for questions. :) The issue tracker is better for bugs and feature enhancements.
I just started using Spine and ran into a few issues. I'm using cocos2d as my game engine.
The text was updated successfully, but these errors were encountered: