maranpis

Hello guys, ⁣ I'm doing a boxing game in Godot with Spine and I don't know how to solve this problem. I'm now programming when the player gets hurt animation. The player has a tail attached to the head and when it dodges to the left or to the right the tail attachment changes. I created a get hurt animation that only changes the upper part of the player, and it works fine except the tail. You can watch it in the video for more explanation.

Kullanıcı avatarı
maranpis
  • Mesajlar: 38

Mario

Your skeleton setup and your code look OK to me. Could you share a simple Godot scene with the front boxer assets? Maybe it's an issue in spine-cpp. But I need your assets to reproduce the issue.
Kullanıcı avatarı
Mario

Mario
  • Mesajlar: 3274

maranpis

Mario yazdı:Your skeleton setup and your code look OK to me. Could you share a simple Godot scene with the front boxer assets? Maybe it's an issue in spine-cpp. But I need your assets to reproduce the issue.
Hello Mario, where should I send it to you?
Kullanıcı avatarı
maranpis
  • Mesajlar: 38

Luke

Hi maranpis, please send it to contact@esotericsoftware.com.
Luke

Luke
  • Mesajlar: 149

maranpis

Luke yazdı:Hi maranpis, please send it to contact@esotericsoftware.com.
Ok, I've already sent it ;)

---

Hello guys :)

Any idea of what going on? I'm really intrigued
Kullanıcı avatarı
maranpis
  • Mesajlar: 38

Nate

We received the project, thank you. We'll have a chance to check it out and get back to you on Monday. Sorry for the delay!
Kullanıcı avatarı
Nate

Nate
  • Mesajlar: 12208

Mario

Sorry it took me a bit to get to this. I've imported your Zrono skeleton and atlas back into the Spine Editor, then used the Preview view to check what happens if I queue zrono_right_dodge on track 0, and zrono_get_hurt_right on track 1. Here‘s what the editor thinks should happen:

Screenshot 2022-12-12 at 10.19.31.png


The runtime thinks the same. So this is not a bug in the runtime, but expected behaviour. Next, I had a look at the attachment timelines in the two animations. Here they are for zrono_right_dodge:

Screenshot 2022-12-12 at 10.21.24.png


The PONNYTALE_IDLE5 attachment is attachment is disabled, the PONNY_TALE_BACK attachment is made visible. PONNY_TALE_BACK is the attachment we see in the screenshot above.

Here are the attachment timelines for the zrono_right_dodge animation:
Screenshot 2022-12-12 at 10.29.06.png

Screenshot 2022-12-12 at 10.24.17.png


The animation does not key any of the two tail slots at all. This means whatever is attached in the setup pose will be used if you play this animation on its own.

However, when you mix animations across tracks, and a lower track keys an attachment that's not set in a higher track, then the lower track attachment is used instead of the setup pose attachment of the higher track. And this is exactly what is happening here.

The solution is to add attachment keys to your animations that you mix with other animations. E.g. in zrono_get_hurt_right, I've keyed the PONNY_TALE_BACK slot to not have an attachment, and the PONNYTALE_IDLE slot to have the PONNYTALE_IDLE attachment attached. Here's the result when zrono_right_dodge is on track 0, and zrono_get_hurt_right is on track 1:
Bu mesaja eklenen dosyaları görüntülemek için gerekli yetkilere sahip değilsiniz.
Kullanıcı avatarı
Mario

Mario
  • Mesajlar: 3274

maranpis

The solution is to add attachment keys to your animations that you mix with other animations. E.g. in zrono_get_hurt_right, I've keyed the PONNY_TALE_BACK slot to not have an attachment, and the PONNYTALE_IDLE slot to have the PONNYTALE_IDLE attachment attached. Here's the result when zrono_right_dodge is on track 0, and zrono_get_hurt_right is on track 1:


I can't see the image you have attached :) maybe you can upload it again
The runtime thinks the same. So this is not a bug in the runtime, but expected behaviour. Next, I had a look at the attachment timelines in the two animations. Here they are for zrono_right_dodge:
As you can see in the video I have a right preview but then in the runtime works differently. I have made a video so you can see in detail what I'm doing.

Kullanıcı avatarı
maranpis
  • Mesajlar: 38


Dön Runtimes