你好,
我正在用Unity做一个2D项目,然后我spine制作了人物骨骼动画并导入进了unity,
之后使用SkeletonMecanim的模式创建了一个玩家物体,并设置好了动画状态机。
之后人物移动和动画状态切换都没有什么问题,但是没有办法像官方案例中控制玩家骨骼的旋转。
因为没有使用SkeletonAnimation模式,所以我直接用animator.GetBoneTransform来试着获取所需骨骼,
但可能是因为我没有设置Avatar,所以无法通过这种方式获取到骨骼。
但是我也尝试使用了Spine的API,利用skeletonAnimation.Skeleton.FindBone获取骨骼,
这样是可以获取到由Spine创建的骨骼的,但是可能是因为动画正在被Animator控制,所以我无法使用bone.Rotation来改变骨骼的旋转。
请问有没有方法可以满足我使用Animator来控制骨骼呢?谢谢你们。
hello,
I am working on a 2D project with unity,
and I create a player from spine skeletondata by using SkeletonMecanim because I want to use unity animator controller to control player animation.
But I got a problem that I cannot get player bones through animator.GetBoneTransform or SkeletonAnimation neither.
With the GetBoneTransform,I guess the problem is because that I cannot set a avatar to the player animator controller so it couldn't find the bone.And with the skeletonAnimation.Skeleton.FindBone,I guess it is because I didn't use the SkeletonAnimation,so that even though it find the correct bone,I also cannot use bone.Rotation to set its rotation.
But I don't know is there any other way to solve this problem.
I am afraid of that google translate cannot translate it correctlly,but I cannot describe this issue clearly in English neither.
So I wrote this forum in both languages,but the English version not directly translate from Chinese version.
Thanks a lot.