|
Post by snackzilla on Nov 11, 2016 1:56:13 GMT
I wonder if anyone else has come across this. I'm messing around with my own jump animations, and I've set up the Extra Jump Force on the v Third Person Controller Script..It all seems to work fairly well, but sometimes the height my player jumps varies greatly. Out of something like 10 times, most jumps will be normal, but once or twice it'll be way higher than the other ones. It happens when I'm both sprinting, or just straight up running. (Messing with JumpMove right now, not just Jump) Is there a different setting I'm missing? Does Jump Force take speed into account or how long the "Jump" button is pressed/held to calculate the proper trajectory for the jump? I'd like all of my jumps to be the same height 10/10 times.
EDIT: Just to add to this, in the debug panel, when I'm jumping, my groundDistance on my JumpMove jumps can be anywhere between 1 and 10. I do have the Extra Jump Force set quite high..But I'm still not sure why there's such a variation in height between the same button presses. Is the jump height randomized?
|
|
|
Post by Invector on Nov 12, 2016 11:15:19 GMT
I just re-make the jump for the 10 time lol, but now it's pretty damn stable, I also change the locomotion physics verification (it was jittering at low fps)
these two fixes will be on 2.0a which I already sent to the asset store ;)
|
|
|
Post by snackzilla on Nov 13, 2016 19:29:14 GMT
Woo! Good to hear! Looking forward to the update. For now, I've got it working somewhat properly. I'm now trying to re-implement my "Evade" mechanic like I had going on the 1.3. I see now there are no parameters for "Jump" or "isJumping" in the Animator. Before, I had created my own State Machine for jumping to the side and backwards by strafing. It was set up something like "If the character is locked on and strafing, and the jump button is pressed, forward that input to my "Evade" state machine depending on the direction the character is moving." IE. Character is strafing..Stick is tilted left, and jump button is pressed, character would jump to the left around the locked on object.
I see LOTS of scripts have changed how the jump mechanics have worked. Could you kindly point me in the right direction of where to look/how to implement this?
EDIT: Nevermind! I did it all with animation! After I started digging through the scripts, I figured it'd just be easiest to set it up with animations. I'll do a write-up and post it on my dev-diary on here and on my main website! Thanks again!
|
|
|
Post by snackzilla on Nov 13, 2016 23:48:08 GMT
I do have another question now though, however. I'm trying to get my character to initiate an attack whilst in the air(when isGrounded is false). In what script does the controller restrict attacking to when the character is only grounded?
|
|
|
Post by Invector on Nov 14, 2016 13:14:17 GMT
We always use conditions before trigger a action, and in this case you can find on the vMeleeCombatInput.cs script, method MeleeAttackConditions()
There you will find the bool cc.doingCustomAction, basically we're using tags on animation states to detect and create conditions on the script, like this:
doingCustomAction = baseLayerInfo.IsTag("CustomAction") || upperBodyInfo.IsTag("CustomAction") || fullBodyInfo.IsTag("CustomAction");
If a animation that has the tag "CustomAction" is playing, then we can filter this action and for example not make the character attack while the Jump or Falling animation is playing.
|
|
|
Post by snackzilla on Nov 14, 2016 15:14:14 GMT
Thank you so much for the information! I will toy with it today when I get off of work!
|
|
Deleted
Deleted Member
Posts: 0
|
Post by Deleted on Dec 4, 2016 13:49:05 GMT
I had a similar problem, for some reason when my character runs and jumps, depending on the run in all, he went pretty high, why did that happen?
|
|
|
Post by snackzilla on Dec 8, 2016 14:40:48 GMT
I had a similar problem, for some reason when my character runs and jumps, depending on the run in all, he went pretty high, why did that happen? I've actually been on vacation and haven't messed with it in a bit, but from what I remember, Jump, and JumpMove (That is, jumping while moving) are two separate actions. If your character is jumping super high while he's running, I'd check your animation parameters for JumpMove. Also, I know the scripts consider velocity of the run when it calculates the height of a JumpMove action, so I'd try putting the extra force to 0 just to test it. If your JumpMove animation gives plenty of height on its own, without the extra JumpForce, I'd find where it calculates the extra force for JumpMove in the script, and comment it out. Unfortunately, for now, the in-editor extra jump force is for both Jump, AND JumpMove, so for now it takes a bit of fiddling to get them both working the way you want them to, especially if you you're using different animations from different packages for Jump and JumpMove, it starts to get a little wacky. Case in point: When I started animating my character the first go-around, I had a non-root animation "Jump", and a root animation "JumpMove". The "Jump" animation needed the extra force that I put in the editor to get the height I wanted, but when I did that, it made my JumpMove (or running Jump) go hilariously high. Once I commented out the extra jump force calculation in the script for JumpMove so it wouldn't use it, both worked properly. I hope that makes sense.
|
|
Deleted
Deleted Member
Posts: 0
|
Post by Deleted on Dec 8, 2016 17:08:17 GMT
|
|