vortexvt

Hello!
We use spine runtime 4.2-beta and godot 3.4.4.
The bounding box from spine animation is displayed in the godot editor, but how do you interact with it? I can't find an api for this :(

Can you tell me what to look for, or a code example?
vortexvt
  • Mesajlar: 1

Harald

Sorry for the troubles! Mario is currently away until Friday evening, he will then get back to you with a definitive answer.

From looking at the current state of the implementation, I'm afraid to say that while BoundingBoxAttachments are visualized in the Godot Editor, the spine-godot runtime does not yet automatically generate any physics bounding shapes from it.

Regardless of the engine used, we would always recommend to use simple bounding boxes (hit boxes) instead of precise mesh-based collision shapes. You can find a posting about it here:
Spine - libGDX collision detection
Kullanıcı avatarı
Harald

Harri
  • Mesajlar: 4449

Mario

What do you want to achieve? The bounding box you see inside the editor viewport is the bounding box calculated for the setup pose. It is mostly there so you can easily click + drag or resize the skeleton in the editor. These operations merely change the node's transform (scale, x/y, rotation), which you can do directly both in the editor and in code as with any other Godot node.
Kullanıcı avatarı
Mario

Mario
  • Mesajlar: 3274

Ryusui

At a guess, I think they want to know how to establish a Spine sprite's collision boxes within Spine itself, adjust them for each animation, etc.

The short answer is I don't think you can at present, but you can attach Godot collision objects to a Spine skeleton using SpineSlotNode, or have them follow (or drive) specific bones with SpineBoneNode.
Ryusui
  • Mesajlar: 28

Mario

Exactly right. The reason we don't expose the bounding box attachments in Godot is because they can be animated. Which means their polygonal region might change over the course of an animation. Sadly, Godot (and most physics engines) do not support changing a colliders shape every frame. It's thus better to setup collision shapes on a SpineSprite directly in Godot, as Ryusui said.
Kullanıcı avatarı
Mario

Mario
  • Mesajlar: 3274

Ryusui

I suppose now that I've said this (and had it confirmed), I have a question of my own.

I may be remembering incorrectly, but the official spine-godot module does not presently support Events (unlike rayxuln's), correct? If this is so, what would be the best way to enable/disable hitboxes during an animation, e.g. for an attack animation with a wind-up?
Ryusui
  • Mesajlar: 28

Mario

Kullanıcı avatarı
Mario

Mario
  • Mesajlar: 3274

Ryusui

Oh, excellent! I don't know why I thought otherwise. Maybe I read something in a different context and got confused? @_@;
Ryusui
  • Mesajlar: 28


Dön Runtimes