谢谢你报告说该组件的行为对你来说是不清楚的。我也刚刚注意到,在spine-unity文档页面上的BoneFollower文档部分仍然列出了4.0的组件,我们会相应的更新。很抱歉听到您遇到麻烦。为“BoneFollower”组件的每个检查器属性提供了工具提示。我认为这些还不够,您能否描述一下您不清楚哪些?或者您是否缺少其他信息?
public bool followSkeletonFlip = true;
“通过控制这个变换的局部比例来跟随骨架的翻转状态。”
public bool followLocalScale = false;
“遵循目标骨骼的局部比例。”
public bool followParentWorldScale = false;
“包括父骨骼的有损世界比例。由于 UnityEngine.Transform 属性限制,BoneFollower 无法继承旋转/倾斜比例。”
公共AxisOrientation维护AxisOrientation = AxisOrientation.XAxis;
“在禁用‘跟随骨骼翻转’但启用‘跟随骨骼旋转’时适用。通过缩放其变换翻转骨骼时,会调整此跟随者的旋转而不是其比例以跟随骨骼方向。当其中一个轴被翻转时, 只能跟随一个轴,可以是 X 轴,也可以是 Y 轴,这里选择。"
一般来说,请总是提供显示你的检查器组件设置的屏幕截图,或者给我们发送一个最小的Unity复制项目。在你的情况下,我们更喜欢Unity项目,你能不能把一个最小的项目以压缩包的形式发给我们,contact@esotericsoftware.com,然后我们可以看看哪里出了问题。
我看了BoneFollower的源码,很奇怪,当勾选flip时,最后翻转的不是x轴,而是翻转了y轴之后又把z轴旋转了180度,很奇怪的做法,无法理解。
这段代码很灵活,但不幸的是不容易理解。请不要花时间去读代码,而要花时间去展示你的设置或准备一个复制项目。
如果不勾选 followSkeletonFlip 而是使用 maintainedAxisOrientation 时,则必须同时搭配 followBoneRotation 一起使用,这不是我所期望的,我希望旋转和翻转可以单独控制。
maintainedAxisOrientation
X/Y属性是在禁用
followSkeletonFlip而启用
followBoneRotation`的情况下提供的,这时会问你哪个轴应该跟随旋转(X或Y),否则当任何节点沿层次结构翻转时就会产生歧义。
Thanks for reporting that the component's behaviour is unclear to you. I also just noticed that the BoneFollower documentation section on the spine-unity documentation pages still lists the 4.0 component, we will update it accordingly. Sorry to hear that you're having troubles. There are tooltips provided for each inspector property of the BoneFollower
component. I assume these were not sufficient, could you please describe which were unclear to you? Or are you missing additional info?
public bool followSkeletonFlip = true;
"Follows the skeleton's flip state by controlling this Transform's local scale."
public bool followLocalScale = false;
"Follows the target bone's local scale."
public bool followParentWorldScale = false;
"Includes the parent bone's lossy world scale. BoneFollower cannot inherit rotated/skewed scale because of UnityEngine.Transform property limitations."
public AxisOrientation maintainedAxisOrientation = AxisOrientation.XAxis;
"Applies when 'Follow Skeleton Flip' is disabled but 'Follow Bone Rotation' is enabled. When flipping the skeleton by scaling its Transform, this follower's rotation is adjusted instead of its scale to follow the bone orientation. When one of the axes is flipped, only one axis can be followed, either the X or the Y axis, which is selected here."
In general, please always either provide screenshots that show your Inspector component settings or send us a minimal Unity reproduction project. In your case, we would prefer a Unity project, could you please send us a minimal project as a zip package to contact@esotericsoftware.com, then we can have a look at what's going wrong.
我看了 BoneFollower 的源码,很奇怪,当勾选flip时,最后翻转的不是x轴,而是翻转了y轴之后又把z轴旋转了180度,很奇怪的做法,无法理解。
The code is flexible but unfortunately not easy to understand. Please don't spend time reading the code, instead spend it on showing your setup or preparing a reproduction project.
如果不勾选 followSkeletonFlip 而是使用 maintainedAxisOrientation 时,则必须同时搭配 followBoneRotation 一起使用,这不是我所期望的,我希望旋转和翻转可以单独控制。
The maintainedAxisOrientation
X/Y
property is provided for when you have followSkeletonFlip
disabled but followBoneRotation
enabled, which then asks you which axis should be followed by rotation (X or Y), which is ambiguous otherwise when any node is flipped along the hierarchy.