• Editor
  • SkeletonMecanim Animation Preview Outside Runtime

Hello!

I'm building a game that requires high precision so I need to place and move hitboxes on many frames of my characters's specific animations.

Thing is, I'm using SkeletonMecanim and even with things working, on Editor mode I cannot preview mecanim animations to place said hitboxes. When I slide the mecanim animation's timeline the spine skeleton keeps on the static pose.

I'm fairly sure I did it in the past, did something change? Is there anyway to preview animation in editor mode when I'm sliding the animation timeline?

  • Harald がこの投稿に返信しました。
    Related Discussions
    ...

    arenaodev I'm fairly sure I did it in the past, did something change? Is there anyway to preview animation in editor mode when I'm sliding the animation timeline?

    We're sorry to say that such a preview of the Animation at a certain timepoint in the Animation window was never available, we have this issue ticket here for this issue:
    EsotericSoftware/spine-runtimes1253
    Unfortunately the Mecanim API is very prohibitive in this regard, which is why this issue is still unresolved.

    The most precise way timewise would be to issue events in the Spine Editor, there you can issue precise timepoints. In Unity, you can then select the animation clip asset (below the Mecanim Controller asset), where you then see the Spine events as Unity Animation events and can enable and place your hit boxes accordingly. I'm afraid that this won't resolve the space-wise precise location and size of your hitboxes however. There I'm afraid you will need to enter Play mode and adjust the animation hit boxes size accordingly to what you see while the game is playing (paused).

    Please note that hit boxes in beat-em-up games typically are sized larger than the actual model's legs and body to feel right, as can be seen in this forum posting:
    https://esotericsoftware.com/forum/d/14667-spine-libgdx-collision-detection/3

    Hey, thanks for your asnwer!

    I won't mind having to enter play mode to edit hitboxes, but as I'm seeing, even while playmode selecting the timeline to any specific point only freezes the animation, it's not playing the animation at that specific timeline point I'm selecting.

    Is there at least something I could do to set the current animation to the state it should be while I'm selecting a specific time in it's timeline while in playmode? That alone would be more than enough.

    Thanks again for you time.

    • Harald がこの投稿に返信しました。

      arenaodev but as I'm seeing, even while playmode selecting the timeline to any specific point only freezes the animation, it's not playing the animation at that specific timeline point I'm selecting.

      Unfortunately placing the cursor in the timeline and having it display the respective animation frame at the skeleton is exactly what is currently not supported (yet), regardless of whether play-mode is entered or not. What I meant by entering play mode and adjust the hitbox size and position is to let the game play your animation in a loop (e.g. by having one animation clip loop in the Mecanim controller), then pause the game and forward frame-wise until you arrive at the respective timepoint, then adjust any hitbox position and scale accordingly. Then framewise-forward to the next critical timepoint, adjust the hitboxes again, and so on.

      Sorry that my previous answer was not clear.

      arenaodev Is there at least something I could do to set the current animation to the state it should be while I'm selecting a specific time in it's timeline while in playmode? That alone would be more than enough.

      One thing that comes to mind is to use the Timeline extension, where you could scrub through an animation clip during play mode and have it apply to your in-game skeleton.

      You can check out this video if you are not yet familiar with using this package:

      Note that Timeline uses the AnimationReferenceAsset animation assets, not the Mecanim animation clips.