Does spine support the removal of parts in real time as I am looking to decapitate one of my fellow warriors!
If so is there an example or concept that can point me in the right direction?
- Thanks :rofl:
Does spine support the removal of parts in real time as I am looking to decapitate one of my fellow warriors!
If so is there an example or concept that can point me in the right direction?
I would start by labelling the 'head' part, then in your code you can find the head slot
Slot slot = skeleton.findSlot("head");
Attachment attachment = slot.getAttachment();
if (attachment == null) continue;
if (!(attachment instanceof RegionAttachment)) continue;
RegionAttachment imageRegion = (RegionAttachment)attachment;
imageRegion.updateVertices(slot);
TextureRegion tex = imageRegion.getRegion();
maybe you can turn the textureRegion into a physics object.
I don't know how to remove the head though.
Wow, decapitation. So if this is gory enough, would you be using Spine to animate a bone representing a spine? lol
Lamellama написалI would start by labelling the 'head' part, then in your code you can find the head slot
Slot slot = skeleton.findSlot("head"); Attachment attachment = slot.getAttachment(); if (attachment == null) continue; if (!(attachment instanceof RegionAttachment)) continue; RegionAttachment imageRegion = (RegionAttachment)attachment; imageRegion.updateVertices(slot);
TextureRegion tex = imageRegion.getRegion();maybe you can turn the textureRegion into a physics object.
I don't know how to remove the head though.
I might replace the texture with an empty one and create a new game object for the head + particle effect for blood... Could work... Thanks !
loneboat написалWow, decapitation. So if this is gory enough, would you be using Spine to animate a bone representing a spine? lol
Ah yes haha I guess I would be wouldn't I? :rofl:
You can just hide the head attachment image or replace it with a bloody stub. Then you can have a separate bone which you show the head image on and animate.
How can we hide attachment