|
Post by snackzilla on Apr 19, 2017 19:11:39 GMT
I suppose this is more of an animation question more than anything. I'm using the Shooter 1.0 system. Sometimes when I'm running and jumping (using JumpMove) and it transitions to "Falling", the Falling animation must fully complete before it goes back to "Free Locomotion" state and I'm able to move the character again. Normally, I'd just reduce the transition time, but the thing is, it doesn't happen EVERY time.
I guess essentially, I'd like the falling animation to end instantly and transition to "Free Locomotion" as soon as the feet of the character hit the ground. I know this is how it SHOULD work, but sometimes the character will stick in the Falling animation until it completes, leaving my character sort of levitating on the ground for just a bit. I'm also using the default animations, but it happens with custom ones too. Has anyone had any success in making the Jumping->Falling-> Free Locomotion buttery smooth? Would it be easier to take out the "Falling" portion entirely from the Airborne state? I'm aiming for a platformer style smooth and accurate jump, as many of my levels have jumping puzzles that require a great amount of accuracy.
If you've got it working smoothly, would you mind sharing your transition times/conditions? Or, if you've worked around it some other way(like removing the transition from Jump to Falling or something), I'd love to hear any solutions. This is a wonderful system, but sometimes my jumps are a bit..off. I would love a way to smooth them out.
|
|
|
Post by Invector on Apr 19, 2017 19:32:05 GMT
Just go into the animator > airborne > falling and uncheck the "Has Exit Time" option from the Falling to Locomotion transition. I miss that on the ShooterMelee animator, the rest of the animators are Ok
|
|
|
Post by snackzilla on Apr 19, 2017 20:11:49 GMT
That worked wonderfully Invector, thank you very much for the quick reply. I don't know why I didn't see that before. Kudos my friends!
|
|
|
Post by snackzilla on Apr 20, 2017 18:54:23 GMT
I don't know if this is the right place for this question. I'm looking to add an air-dash to a post-jump. Think Jump -> Dash a specific direction in the Air -> Falling -> Land. I have a basic idea how to set this up, and I actually have the animation working, but my Dash, while playing the proper animation, doesn't actually go anywhere. The Dash animation plays, but it actually doesn't move the player forward as it's supposed to. Is there anywhere in the script that locks the Jump motion to a straight up and down sort of thing? Actually got the idea while playing Andromeda and I fell in love with the Jump up to see the surrounding AI, then dash a direction to get out of the direct line of fire. Something like this.
Any idea on how to do this with the system?
|
|
|
Post by uberwiggett on Apr 21, 2017 5:36:19 GMT
Is the dash animation root motion? It may be that the animation is a static position one and won't move the model. Apparently you can modify static positions with the moveset speed script but I haven't played with that yet.
|
|
|
Post by snackzilla on Apr 22, 2017 0:24:28 GMT
It's a root animation. Works as intended when character is grounded. I've been messing with creating a custom "Ability" (Like Roll, JumpOver, ect) for it in the script. Will update if I ever get it figured out.
|
|
|
Post by uberwiggett on Apr 22, 2017 0:58:04 GMT
Ahh ok. I know there is a section for controlling direction in air but maybe there is a piece of code missing that propels the character? Try comparing the code that handles walking and jumping. Or maybe invector can help
|
|
|
Post by Invector on Apr 22, 2017 14:15:56 GMT
if your dash animation is 'inplace' you could use rigibody.AddForce while the animations is playing
|
|
|
Post by snackzilla on Apr 23, 2017 1:23:46 GMT
Thanks for the suggestions guys! When I get back at it, these will be the first things that I try.
|
|
ThePace
Junior vMember
Unity Noob
Posts: 45
|
Post by ThePace on Apr 26, 2017 17:57:54 GMT
Another incredible idea, I feel like ive stumbled upon a pool of greater beings here!!! Jeez
|
|
|
Post by snackzilla on Apr 26, 2017 18:34:44 GMT
Quick update on this! I've come across another small problem that I'm still working on. I've essentially replaced the "Roll" action with this "Dash", as I like the way it looks on the ground also. I've removed the conditions that prohibit the "Roll" from initiating while in the air (the checks on isGrounded and such).
The problem NOW is that the "Falling" animation interrupts the "Roll"(Now a Dash) in the air. (The player jumps, starts the Dash animation, then goes straight into Falling)
Is there a specific place where I would add a condition to the "Falling" animation where it checks to see if the roll animation is playing before kicking in?
|
|
|
Post by Invector on Apr 26, 2017 18:40:56 GMT
Quick update on this! I've come across another small problem that I'm still working on. I've essentially replaced the "Roll" action with this "Dash", as I like the way it looks on the ground also. I've removed the conditions that prohibit the "Roll" from initiating while in the air (the checks on isGrounded and such). The problem NOW is that the "Falling" animation interrupts the "Roll"(Now a Dash) in the air. (The player jumps, starts the Dash animation, then goes straight into Falling) Is there a specific place where I would add a condition to the "Falling" animation where it checks to see if the roll animation is playing before kicking in? There is several ways you could stop the Falling verification, one that I'm using right now to make the swimming is > whenever the character is doing the action I change the generic int from the animator called ActionState. tpInput.cc.animator.SetInteger("ActionState", 1);and add a condition to enter the falling state only if ActionState is 0, this way I can manage several new actions using this generic int.
|
|
|
Post by snackzilla on Apr 26, 2017 20:55:21 GMT
That was a brilliant suggestion, Invector. I've now got the AirDash setting Action State at 1, and then triggering "ResetState()" at the end of the animation with an animation event. The full "Dash" animation plays whilst jumping now, and regular jumping and falling works as it should. One more issue, however, is although the animation plays fully, the character remains in the regular jump position. I toyed with adding _rigidbody.AddForce, but I'm not quite sure where to put it. It seems there's something keeping my character from moving forward when using the animation. I'm assuming it has something to do with the jump control settings itself. I'll keep playing with it later, but thank you so much for your help already.
|
|
|
Post by snackzilla on Apr 28, 2017 3:25:31 GMT
So..I've managed to somewhat figure this Air-Dash thing out. I've switched my Root animation for an InPlace animation, and I'm applying velocity manually. It looks a little goofy, but it works. With one major exception..Whenever I initiate the "AirDash" (Which is really the Roll action) too close to the ground, the character shoots across the map like a slingshot. It's quite hilarious, but also quite a problem. I've actually uploaded a video to highlight what I mean. I would RATHER go with a root animation, for for the life of me, I could not figure out how to get it to work the same in the air as it was in the ground. Would this have anything to do with the collider changing to slippyPhysics whilst it's not grounded? Or it there some other programming sorcery that I'm missing?
Video as Follows:
|
|
|
Post by Strider on Aug 27, 2017 0:41:37 GMT
So..I've managed to somewhat figure this Air-Dash thing out. I've switched my Root animation for an InPlace animation, and I'm applying velocity manually. It looks a little goofy, but it works. With one major exception..Whenever I initiate the "AirDash" (Which is really the Roll action) too close to the ground, the character shoots across the map like a slingshot. It's quite hilarious, but also quite a problem. I've actually uploaded a video to highlight what I mean. I would RATHER go with a root animation, for for the life of me, I could not figure out how to get it to work the same in the air as it was in the ground. Would this have anything to do with the collider changing to slippyPhysics whilst it's not grounded? Or it there some other programming sorcery that I'm missing? Video as Follows: i'm also trying to acomplish a jump dash, but doesn't see any grounded condition in my animator controller, or is it in the code itself?
|
|