fshakhverdiyev Sorry, I removed Spinebot's answer to avoid confusion.
spine-unity transform player to root position on last frame of animation
Misaki I can use this component but i have tone of animations without root motion. If i enable for some specific case i think this maybe cause some issues. Isnt it ? For example : Walk, Run, Jump etc. doesnt need SkeletonRootMotion on my case. What do you recommend ?
Misaki And when i disable root motion, root bone behave like same. And same issue coming again. I just want to translate my player to root bone position and keep root bone where its are. If my solution merhod is wrong please give me advice for achieving that. Thanks!
fshakhverdiyev It is a good idea to have a track for the animation to which the root motion needs to be applied and specify the track number in the Animation Tracks
of the SkeletonRootMotion
component.
The SkeletonRootMotion
changes the position of the GameObject not at the end of the animation, but at any time, so there should be no problem with the GameObject returning to its original position if it is disabled in the middle of the animation.
Misaki This help me a lot! Thanks
Misaki But i cant handle opposite direction. Am i on wrong way for create player like this ?
https://en.esotericsoftware.com/forum/assets/files/2025-02-07/1738925915-417763-2025-02-07-14-56-12.mkv
You can see : CLimb to right side work perfectly but not left. Because root bone position still translate to same direction. What is good way create simple Climbing like this ?
@fshakhverdiyev How did you mirror the skeleton to chieve the direction flip? In general the SkeletonRootMotion
component should work automatically with flipped x direction movement.
Harald I fix the issue from zero. I remove root motion completely and remove root key frames from animation. I manually update my Rigidbody velocity in script. I think this is maintainable, predictable and extendable. If your have any advice for me. Please let me know. Thanks! (Flip my character with root bone ScaleX)
fshakhverdiyev If your have any advice for me. Please let me know. Thanks! (Flip my character with root bone ScaleX)
Are you flipping the same root bone that you're using as Root Bone
for the RootMotion component? If so, that sounds somewhat problematic to me. I'm not quite sure yet if this shall be supported or whether it poses a theoretical problem.
Please consider flipping via setting Skeleton.ScaleX
or via flipping the GameObject's Transform Scale X value for now.
fshakhverdiyev I fix the issue from zero. I remove root motion completely and remove root key frames from animation. I manually update my Rigidbody velocity in script. I think this is maintainable, predictable and extendable
That's good to hear, thanks for letting us know.
Harald Hi again. On my case : ScaleX set -1 for root bone. And RootMotion component applied for rootBone but root motion applied for just 1 direction. For example : If Root going to 1.9x 1y for ScaleX = 1 same for ScaleX = -1. But i expected -1.9x and 1y. How can i achieve that ? Is it possible ?
Harald Skeleton.ScaleX works fine thanks
fshakhverdiyev Hi again. On my case : ScaleX set -1 for root bone. And RootMotion component applied for rootBone
By the above sentence, do you mean you have the following hierarchy?
root // you scale that -1 and 1
- rootBone // this is your bone assigned at the SkeletonRootMotion component
-- hip and other skeleton bones
fshakhverdiyev @Misaki @Harald can you asist please ?
Please note that during weekends replies may take until Monday.
fshakhverdiyev Harald Skeleton.ScaleX works fine thanks
Glad to hear you've got it worked out! Thanks for letting us know.
@fshakhverdiyev We've just tested the above hierarchy, which works as intended on our end:
root // you scale that -1 and 1
- rootBone // this is your bone assigned at the SkeletonRootMotion component
-- hip and other skeleton bones
So unfortunately we could not yet reproduce any issue on our end. Could you please describe your bone hierarchy and scaling setup?