Oh man, thanks for the reply. I did not know that we could make two distinct animations blend together in one.
But anyway, I'm really having trouble to understand how exactly I may do this. I'm using Unity c#, and I'm not figuring out how to do it.
Oh man, thanks for the reply. I did not know that we could make two distinct animations blend together in one.
But anyway, I'm really having trouble to understand how exactly I may do this. I'm using Unity c#, and I'm not figuring out how to do it.
So, I'm writing a game that two parts of the character needs to be in a different skeleton to be animated differently during runtime.
For example, the arms has to be separated from the body, in a different skeleton, so the arm can be animated separately. If the character reloads the weapon, the arms starts the reloading animation, but the body doesn't. So when the character jumps, and starts reloading in the air, the body can continue its jumping animation, but the arm can starts its reloading animation independently.
The programming of this section is already done. Every frame, the arm skeleton is translated to the same position of the "arm_root" bone of the body skeleton.
The problem is, the arm needs to be animated within its parent inside Spine. Because I have to make sure it is synchronized with the body, and to make sure that the whole animation is consistent.
What do I do EVERYTIME I want to create or edit an animation?
This process of duplicating, renaming correctly, moving the bones and translating everything is the SAME PROCESS ALWAYS, and it takes about 4 minutes to do. Since I do it about 30 times a day for testing purposes, it takes about 2 hours per day just to manually do all these things, which is very time consuming.
Okay, now that I explained my problem, I wanted to ask if there is a way to make custom export scripts to make this process, which is basically:
Anyway, your application is the best for animation. I'm using it for about two years and I'm LOVING it.
Thanks.
So, the Spine application works in frames. But the runtimes works in seconds.
Is there a way to go to a desired time during runtime?
skeleton.PlayAt(1.25f)
or
skeleton.currentTime = 1.25f
something like that?
I have some different animations that needs to be synchronized, and this would be the easiest solution I've found.
Thanks.
Oh god.............. it worked! What the hell, man?
Anyway, no, inside the Spine Editor, the movements are kinda basic. No scaling and not moving too much away the (0, 0) origin. The only thing that is a little higher than normal is the Bone Count - 32 bones.
Anyway, this solution, temporary or not, it worked! Thanks a lot!
So, the GameObjects of the examples I've sent are not moving neither changing its scale.
It's just characters standing still in a certain position, and when I move the camera, it starts flickering.
In fact, it only flickers when the conditions I've stated are met. You instantiate the character throught a prefab reference and right at the next line you make the gameObject inactive, and then activate it back throught code in a later instance (if activated back throught the inspector, the bug does not happen). It's a very strange behaviour.
Oh yes, this was one of the tests I've made. If I zoom out, it stops, but when I move the animation up the y-axis a little bit, it happens again. Zoom out a little more, stops, increase the y position happens again, and so on.
Thanks for the fast answer.
Hello, so, I THINK I've found a nasty bug...
I've done a plant monster moving inside Spine App, This Plant is the third boss of my game, but it's the first one I've done with the edit mesh feature.
How my game works? When the player enters a new level, everything, including the Boss is loaded, but the Boss's gameObject.activeSelf is set to false as soon as he is created. When the player gets to the Boss Room, the Boss's gameObject.activeSelf is set to true.
This worked nice with the other bosses, but with this one, when I ENABLE the gameObject, it starts flickering like hell (one frame is visible, another one is invisible, and so on).
But (this part is important) the object ONLY FLICKERS when, as soon as I instantiate it, I make it invisible (copy.SetActive(false)) and I ACTIVATE it back THROUGH CODE (if press some key -> copy.SetActive(true)). If I activate it back with the inspector, this strange behaviour does not happen.
Another thing to consider. It only flickers when the object is above a given y position. Yeah, strange.
I've made two examples. One using the tk2d official runtime and the other using the unity official runtimes
The attachment is 5Mb, I ask you to download it here:
http://www.filemail.com/d/nzpjooawvwnstkv
I've also created a readme.txt inside the file. Please read it for instructions in how to activate the bug.
Thanks.
So, I've searched and didn't find a good answer. And Spine is growing everyday, so I really need to ask this again.
Is IK posing inside Unity (during runtime) already a reality? Can it be done? I mean, ask a parent bone to follow the mouse and make all its children follow it? Just like inside Spine App?
Thanks.
Hello, I've just bought the Spine's professional licence. I tried skinning a character in the application, but when I import it to Unity, I get this message:
Error reading skeleton JSON file for skeleton data asset: SkinnedBird
The requested value 'skinnedmesh' was not found.
at System.Enum.Parse (System.Type enumType, System.String value, Boolean ignoreCase)
When I use a non-skinned asset, it works fine. Is the skin feature not yet supported? Or I am doing something wrong?
Thanks
Hello, can I control my spine animation opacity throught unity? I meah, the alpha channel of the color?
If yes, how may I do this throught the editor and throught code?
Thanks.
Well... I opened an old file and the draw order got messed up.
I reorganized the draw order in "Setup" mode, but when I changed back to "Animate" mode, the draw order got messed up again. The slots in the "Draw Order" hierarchy are not staying at where I put them. It's like they keep going back to the original draw order.
I created a new file and set a simpler character from scratch. The draw order is still doing the same thing.
Anyway, I really have to animate lots of stuff right now, and I've already did the update, is there a way for me to download the older release again?
EDIT
Okay, I've downgraded to 1.7.12
Everything is working again.
Do you think this will be a good addition to the permanent code? So the next releases would have this? I'm sending to you a zipped file with the 2 modified versions if you liked the idea.
I've added this in SkeletonComponent.cs:
public bool ignoreTimeScale; // Now in line 45
// Inside Update
float delta = Time.deltaTime; // Line 135
if (ignoreTimeScale && Application.isPlaying) //To not take effect in editor
{
float timeNow = Time.realtimeSinceStartup;
delta = timeNow - lastInterval;
lastInterval = timeNow;
}
UpdateSkeleton(delta); // Line 144
And this in SkeletonAnimationInspector.cs:
, ignoreTimeScale // Line 35
EditorGUILayout.PropertyField(ignoreTimeScale); // Line 106
It is working like a charm. I'm sending an attachment with the 2 files.
Thanks a lot!
Thanks you both. I'm already into it. Will make it happen in no time. Thanks!