Right now I'm trying to use 1D Blend tree in Animator to smooth animation from idle to walk to run.
But I face a problem that I don't know why it does that.
I use Store Speed node to set the parameter in the Blend tree to Object Horizontal Speed. And then I use the keyboard to move the object but the Horizontal Speed keeps changing back and forth between 0 and 2 (I set moveSpeed to 1)
My question is: Why does Horizontal Speed keep changing between 0 and 2 despite the fact that I set movespeed Variable to 1.
Because this problem that I don't know why it does that so my Blend tree parameter also keep changing back and forth between 0 and 2. So you know my animation look jerking. (= =!)
I only use Move node, Store Speed node and set Animation node in Fixed update Machine.
If you're enjoying my products, updates and support, please consider supporting me on patreon.com!
But does it occur anything weird with physic if use Move Rigibody in Update machine?
They said I only use physics-based movement on Fixed Update.
But don't know anything will go wrong with Update or not.
I'll do some tests.
If you're enjoying my products, updates and support, please consider supporting me on patreon.com!
If you're enjoying my products, updates and support, please consider supporting me on patreon.com!
And yes my input Horizontal and Vertical had Fixed Update enabled.
I just use Move node and Store Speed node with Speed Variable set to 1.
And I can clearly see the Horizontal Speed in "Object Change" Script is changing back and forth between 0 and 2 and not a constant speed. Even though I use it in Update machine. :(
The change even more dramatic when I set Speed Variable to a higher number. Let say 10 it will be changing somewhere between 5 and 20.
Also to let you know that despite I use Move Position in Move node I got 0 Velocity even the "Object Change" show Horizatal Speed > 0. Why is that?
Only when I use Add Force I got a constant speed and constant Velocity.
If you're enjoying my products, updates and support, please consider supporting me on patreon.com!
But that lead to another problem of my gameplay, turn on kinematic will make my player can't stay on planform (I'll not parent player to the platform that will lead to another problem later on) and if I turn on gravity in the Move node then my character just sinks through the ground.
Haizz! Maybe I stick with the Add force then. Your move node is great for the beginner just want a character to move, but isn't if I want to make advance character system.
Thank you for your help :)
Also, it's always a good idea to check Unity's scripting reference in case there's something that needs to be considered. While Makinom tries to make it as easy as possible for you, things might not behave the way you expect due to not being used the way Unity wants you to.
If you're enjoying my products, updates and support, please consider supporting me on patreon.com!
Thank!