Post by freebolt on Feb 11, 2018 23:07:14 GMT
Hello, I would like to add some dash/dodge movement to my melee template, similar to Nioh, in which you can use a single button to sprint, dash/dodge and roll (double hitting on same button). Note: i've been researching in this forum about this topic and what I found was not exactly what I was looking for.
I'm just a 3d modeler and animator and my knowledge about coding/scripting is quite poor, so the only thing I could do untill now is what follows next (it is not working properly anyways) :
1- First thing I did was to add a new parameter to the animator called "IsSprinting" (as a bool)
2. Then I added this line: "animator.SetBool("IsSprinting", isSprinting);" to the "vThirdPersonAnimator.cs" script to be able to use "IsSprinting" as a new condition when I make some transition (btw, I changed the joystick sprint input to the "A" button).
3. Next thing I did was to create a new Sub-State Machine in which I put four animations for dashing/dodging toward four different directions.
4. The transition from "Any State" to any of the four animations has these conditions added:
to Dash to right
to Dash to Left
to Dash forward
to Dash backward
5. The transition from any of the animations to "Exit" has this condition:
Well it does not work as I expected, since it is not doing the forward/backward dash at all (it seems to glich when I try it), also, for some reason the animations play on spot and ofc, I'm unable to get the other features I would like to add to my game (sprint/dash/roll with a single button) working, but at least I can dash to left/right sides...xD I'm pretty sure this is not the right way to add the mechanics I want, so I would be glad if someone can give me some light on how to get this properly done.
Here a little video where I show what i got:
Note: these are not the final dash/dodge animations I would use.
Sorry my english! Greetings!
I'm just a 3d modeler and animator and my knowledge about coding/scripting is quite poor, so the only thing I could do untill now is what follows next (it is not working properly anyways) :
1- First thing I did was to add a new parameter to the animator called "IsSprinting" (as a bool)
2. Then I added this line: "animator.SetBool("IsSprinting", isSprinting);" to the "vThirdPersonAnimator.cs" script to be able to use "IsSprinting" as a new condition when I make some transition (btw, I changed the joystick sprint input to the "A" button).
3. Next thing I did was to create a new Sub-State Machine in which I put four animations for dashing/dodging toward four different directions.
4. The transition from "Any State" to any of the four animations has these conditions added:
to Dash to right
to Dash to Left
to Dash forward
to Dash backward
5. The transition from any of the animations to "Exit" has this condition:
Well it does not work as I expected, since it is not doing the forward/backward dash at all (it seems to glich when I try it), also, for some reason the animations play on spot and ofc, I'm unable to get the other features I would like to add to my game (sprint/dash/roll with a single button) working, but at least I can dash to left/right sides...xD I'm pretty sure this is not the right way to add the mechanics I want, so I would be glad if someone can give me some light on how to get this properly done.
Here a little video where I show what i got:
Note: these are not the final dash/dodge animations I would use.
Sorry my english! Greetings!