• Editor
  • Animated attachments?

What is the best way to go around having specific animations for attachments?

Say, for example, if I have lots of different weapons that will be used as attachments but I would ideally like to have animations for the weapons themselves which would change for each weapon (different shooting styles, some weapons more complex, ect)

Whats the smart way of going about this? Would it be to create separate animations for the bone related to the weapon slot?

🙂

Related Discussions
...
  • Modificato

I would create a dummy attachment and parent it to the correct bone, just so I have a bit of reference. Then I'd create a separate skeleton for the weapon and animate it there. Then at runtime place the weapon in the right position.

Yeah, that makes sense. Would you suggest having arms/hands on the weapon skeleton itself? I would imagine that would be the easiest way.

I would keep arms/hands in the character skeleton. You will however need to tweak draw order for the hand/weapon at runtime as well, but it should be relatively simple to do. As long as you have a dummy weapon in your character skeleton it will be relatively simple to match them up.
On our trello board we do have a task to be able to attach an entire skeleton to a bone.

Ah that would be perfect for this. You can tweak draw order for bones over other skeletons? I thought it was only for the 'local' skeleton.

Maybe I am misunderstanding, but how I am thinking about this, the weapon and the character would be two different skeletons, and I would be just positioning the weapon in the correct place at runtime, which would be the dummy weapon bone's transform from the character skeleton.

You will only be able to tweak the local draw order. But at runtime you can grab the hand and make sure it is drawn in front of the weapon. Or you can paint a hand image on the weapon skeleton as well.

Gotcha, that sounds like the reasonable way to go, at least until skeleton attaching gets added, if it does get addded.

Thanks for taking the time to explain this, much appreciated 🙂