您正在使用“大小到内容”标志,并期望骨架中的空白空间(我的屏幕截图中的绿色框)得到考虑。 但 Spine 运行时只知道屏幕截图中的蓝色框,因为它是设置姿势中可见附件周围的边界框。 当您创建“SpineWidget”时,该小部件必须告诉 UE 它的大小。 小部件只知道蓝色框,所以这就是它报告的内容。 “大小到内容”标志只会将小部件扩展或缩小到蓝色框。
恐怕这是 UE Slat/UI 框架的限制。 我不确定我们能否在一般情况下解决这个问题。 您可以编写一个函数,通过获取其设置姿势边界框并将从 (0,0) 的偏移量添加到边界框的下边缘,将小部件偏移 y 轴上的空白空间。
You are using the "size to content" flag and expect the empty space in your skeleton (green box in my screenshot) to be accounted for. But the Spine Runtime only knows about the blue box in the screenshot, as that that is the bounding box around the visible attachments in the setup pose. When you create a SpineWidget
, the widget has to tell UE its size. The widget only knows about the blue box, so that is what it reports. The "size to content" flag will only expand or shrink the widget to the blue box.
I'm afraid that is a limitation of UE Slat/UI framework. I'm not sure we can fix this on our end in the general case. You could write a function that offsets the widget by the empty space on the y-axis by taking its setup pose bounding box and adding the offset from (0,0) to the lower edge of the bounding box.