nater
New vMember
Posts: 4
|
Post by nater on Sept 3, 2019 6:43:57 GMT
Hey everyone,
I'm fairly new to this, but I'm replacing the animations from the asset with custom animations.
All my animations are cycles on the spot, not forward translating using root motion. When I made the run cycle for example, he's running on the spot. when I plug that run cycle in, he runs forward as expected. When I made the Roll animation, he rolls on the spot without moving.
When I plug that animation in, he does not roll forward, as I would expect. Is there a way to set this up so that he does roll forward and the camera etc follows?
I've tried animating the root motion on the animation clip, and yes, he does roll forward as expected, however he pops back to where he was when he entered the clip. Not sure what I need to do here.
Thank you so much! have a great day!
|
|
|
Post by Invector on Sept 3, 2019 17:46:53 GMT
The roll is a custom action, and all custom actions are driven using root motion. Since you already add root motion to your animation, you just need to set up correctly, if it's returning to the original position, you probably checked the option Root Transform Position (ZX) Bake into pose, uncheck that and it should work correct
|
|
nater
New vMember
Posts: 4
|
Post by nater on Sept 4, 2019 3:09:27 GMT
Thank you! Strange, I don't see those options in my clip docs.unity3d.com/Manual/RootMotion.htmlFor example, my clip says "root motion contains root curves", but with no options to edit anything like shown in the document above.
|
|
|
Post by Invector on Sept 4, 2019 16:33:44 GMT
|
|
nater
New vMember
Posts: 4
|
Post by nater on Sept 5, 2019 5:03:47 GMT
Yeah, I guess I could edit each animation.. however they are all on the spot except for the roll..
Is there no way to edit the distance for the roll in script??
|
|
nater
New vMember
Posts: 4
|
Post by nater on Sept 5, 2019 5:46:03 GMT
anyways, thanks for your time - I have much to learn as I'm fairly new and Im sure you get dumb questions like this often
|
|
|
Post by Invector on Sept 5, 2019 12:55:14 GMT
I think we're having a miscommunication here... the Roll is the animation that requires a RootMotion because it is a Custom Action, like the other actions (climb, jumpOver, stepUp) they all are driven by root motion.
The movement animations don't necessarily need root motion because you can set individual rigidbody speeds in the inspector
With that clear, yes you could create a script that overrides the current speed while the roll animation is playing, you could use the AnimatorTag to detect the roll (check documentation about the animator tag)
|
|