xxl

我想要把特效绑定在骨骼上,一开始我使用了SkeletonUtilityBone,然后把特效直接作为骨骼的子物体。

后来我仔细查看文档发现了BoneFollower这个组件,于是改为使用BoneFollower。

但我发现这两种方法的效果有差异。

最明显的就是Y轴缩放,跟随同样的骨骼,SkeletonUtilityBone的Y轴缩放是-1,但BoneFollower的Y轴缩放是1.
这导致了最明显的视觉差异。

其他各项数据,例如位移、旋转等,虽然也有差异,但看起来还好,基本在差不多的位置。

为什么。
xxl
  • Postovi: 21

Harald

您使用的是哪个版本的 spin-unity 运行时?在更高版本的 4.0 版本中,“BoneFollower”组件中添加了一些功能,因此如果您使用的是 4.0 或 3.8 运行时的旧版本,这些功能可能会丢失。

您能否分享显示两种结果有何不同的屏幕截图。还请分享您的“BoneFollower”检查器设置的屏幕截图。

BoneFollower 组件从组合应用的变换中导出旋转和缩放值,而每个 SkeletonUtilityBone 可以直接使用局部旋转和缩放值,没有任何歧义。因此,差异很可能是由于层次结构中一个或多个骨骼的负比例,在某些情况下,这与 180 度旋转是模棱两可的。

不过,如果您可以创建一个显示差异的最小 Unity 项目,并将其作为 zip 包发送到contact@esotericsoftware.com,如果我们可以改进组件,我们可以看看它。请在电子邮件中简要提及此论坛 URL,以便我们了解上下文。
-----
Which version of the spine-unity runtime are you using? There have been some features added to the BoneFollower components in a later 4.0 version, so if you are using an older version of the 4.0 or 3.8 runtimes, these might be missing.

Could you please share screenshots which show how both results difffer. Please also share a screenshot of your BoneFollower Inspector settings.

The BoneFollower component derives rotation and scale values from the combined applied transform, while each SkeletonUtilityBone can directly use the local rotation and scale values, without any ambiguity. So the difference is most likely due to negative scale in one or more bones in the hierarchy, which is ambiguous with 180 degree rotation in some cases.

Nevertheless, if you could create a minimal Unity project that shows the difference, and send it as a zip package to contact@esotericsoftware.com, we could have a look at it if we could perhaps improve the component. Please briefly mentioning this forum URL in the email so that we know the context.
Avatar
Harald

Harri
  • Postovi: 4101

xxl

我使用 Spine4.0.

我暂时没法提供截图,但我找到了原因:层次结构中有一个骨头的缩放值为-1。

我试着描述一下上下文:

BoneA (scaleY = -1)
|----BoneB
|-------|----BoneC
|-------|------|---- ParticleEffect

我想要我的特效在 BoneC 的位置显示。
当使用SkeletonUtilityBone时,我把特效作为子物体挂在 BoneC 下,由于BoneA 的缩放值是 -1,因此特效的Y轴翻转了。
当使用BoneFollower时,由于 BoneC 的缩放是1,因此特效的方向是正常的。

我目前测试的结果是,使用BoneFollower来让特效跟随BoneC,与使用SkeletonUtilityBone然后把特效直接作为BoneC的子物体,这两种的显示效果是有区别的。SkeletonUtilityBone会把层次结构的缩放值逐层传递,而BoneFollower不会。

所以,这种现象是正常的吗?或者有办法可以使 BoneFollower 的效果与 SkeletonUtilityBone 相同?
xxl
  • Postovi: 21

Harald

您能否分享一下您使用的是哪个版本的 spin-unity 运行时? unitypackage 的名称包含一个日期,如 2021-12-01,它描述了您的包是哪个版本。 同样的版本也列在 Assets/Spineversion.txt 文件中。

如果您使用的是最新的 spin-unity 包,您可以创建一个显示差异的最小 Unity 项目,并将其作为 zip 包发送到 contact@esotericsoftware.com。 然后我们可以看看它是否可以改进组件。 请在电子邮件中简要提及此论坛 URL,以便我们了解上下文。
-----
Could you please share which exact version of the spine-unity runtime you are using? The name of the unitypackage contains a date like 2021-12-01 which describes which version your package is. The same version is also listed in the version.txt file in Assets/Spine.

If you are using an up-to-date spine-unity package, you could create a minimal Unity project that shows the difference, and send it as a zip package to contact@esotericsoftware.com. Then we can have a look at it if we could perhaps improve the component. Please briefly mentioning this forum URL in the email so that we know the context.
Avatar
Harald

Harri
  • Postovi: 4101

xxl

This Spine-Unity runtime works with data exported from Spine Editor version: 4.0.xx
Package version: spine-unity-4.0-2021-08-16.unitypackage
xxl
  • Postovi: 21

Harald

谢谢(你的)信息。
您可以尝试更新到更新的 unitypackage,在 2021 年 12 月 15 日,我们已经对 BoneFollower 组件进行了一些更新,并添加了一个额外的 Follow Parent World Scale 参数。
-----
Thanks for the info.
You could try updating to a newer unitypackage, on 2021-12-15 we have committed some updates to BoneFollower components, an additional Follow Parent World Scale parameter was added.
Avatar
Harald

Harri
  • Postovi: 4101

xxl

非常感谢!
xxl
  • Postovi: 21


Natrag na 中国Spine用户