rebelgameguru

Does spine support the removal of parts in real time as I am looking to decapitate one of my fellow warriors! :D

If so is there an example or concept that can point me in the right direction?

- Thanks :rofl:
rebelgameguru
  • Сообщения: 3

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.
Lamellama
  • Сообщения: 9

loneboat

Wow, decapitation. So if this is gory enough, would you be using Spine to animate a bone representing a spine? lol
loneboat
  • Сообщения: 6

rebelgameguru

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 ! :D
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:
rebelgameguru
  • Сообщения: 3

Nate

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.
Аватара пользователя
Nate

Nate
  • Сообщения: 11260

warmanw

How can we hide attachment
Аватара пользователя
warmanw

Kickstarter Backer
  • Сообщения: 274

Nate

Аватара пользователя
Nate

Nate
  • Сообщения: 11260


Вернуться в Editor