• Unity
  • Zelda Like Game - Spine/Unity Issues

Hello Everyone,
I am posting today because we are having all sorts of unforeseen issues with the implementation of spine into Unity. First of all we are developing a game that is a top down Zelda like adventure title which means that we have 3 perspectives for each character in the game. The character skeleton is also fairly complex as well. Not to mention we have a lot of weapons, armor and various equipment to change for the players character. Here is an example below.
http://prntscr.com/e502ff

One of the most prominent issues we are having is when we "equip" or "un-equip"equipment (weapons/items that you visually see the character holding) . A good example of this is if we try to change the sword sprite. The animation will change the sprite back to the original sword and over-ride any code that may be put into place. It would be of great help if we could figure out how we can swap out graphics efficiently and not have to battle against the animation system constantly.

When we mix animations together it doesn't seem to work properly. For example when the player attacks the players mouth will open like he is yelling. When we return to the idle pose his mouth will stay opened despite the mouth closing during the last few frames of the attack animation. :bang: Or when the hero jumps and lands on the ground he will close his eyes before opening them. When the jump/land mixes back to idle his eyes are closed despite them returning to opened in the jump animation.
This happens in several instances and its quite frustrating.

Ive also noticed in some situations that when we change animations the draw order doesn't seem to update as it should. For example when the hero runs his foot will be moved so its in front of the leg but it is behind it during the idle animation. But for some reason when the player returns to idle the foot will remain drawn over the leg and its just a glaring issue.

I'm guessing others have had to have ran into similar issues and may be able to offer their input.

Related Discussions
...
  1. Are you using Spine 3.5? Are you using SkeletonAnimation? Both your problems with the mouth and the foot should be fixed in 3.5 (rather than manually handled as it needed to be before).

If it's not working, there's a bug we need to find and fix.

  1. How are you doing equips? The recommended way is to use a runtime-created and runtime-managed skin, and the animations pull the correct attachments from the skin instead of you setting them all the time.
Pharan wrote
  1. Are you using Spine 3.5? Are you using SkeletonAnimation? Both your problems with the mouth and the foot should be fixed in 3.5 (rather than manually handled as it needed to be before).

Im using 3.5.46 and skeleton animation

Pharan wrote

2. How are you doing equips? The recommended way is to use a runtime-created and runtime-managed skin, and the animations pull the correct attachments from the skin instead of you setting them all the time.

Currently skins are used for clothing. So we have normal cloths, clothing2,clothing3 ect. If I added weapons on top of that wouldn't it effect the clothing? I'm not sure how we would even manage it if we added weapons on top of it unless it somehow didn't effect the clothing. Not to mention what would we do if we wanted to just change out parts like a helmet apposed to the characters entire clothing set.

Can you send us the problematic skeleton and steps on how to produce the problem? contact@esotericsoftware.com

At runtime, you can combine skins, pick and choose and add and replace attachments.
It wouldn't affect the clothing unless you programmed it that way.

Thanks for the response. I think we are closer to figuring this out. The skins system is a bit strange so I actually thought I could only use skins for something like clothes only and I would not be able to combine skins.

I separated it out so now the sword, shield & clothes have skins as well. My thoughts are that I can select a skin for the clothes and then also select a skin to activate the sword or shield. One question? How do we go about setting multiple skins at once?

Right now it seems we can only activate one at a time and it automatically makes the others inactive.

That's true. Currently, you only have one Skin object active.
And currently, this is a matter of workflow and a matter of the way you look at things.
Essentially, at runtime, a Skin is just a list of attachments that the skeleton uses to look up which attachment belongs where.
Even attachments that weren't in Skin Placeholders in the Editor are in a Skin at runtime (the Skeleton.DefaultSkin).

So currently, the user needs to combine multiple skins into one skin so it's as if multiple skins are used at once. This allows the user to handle their skin use case, where skins may overlap, or skins meant to replace each other overlap imperfectly (some skins have shoulder armor, and others don't).

A multiple skins workflow is likely to be done for the editor and API side in the future: Allow multiple skins to be active at once · #17 · EsotericSoftware/spine-editor