Unity3D idle player animation overrides jump animation - unity3d

I've followed the brackeys tutorials to make a 2D Player Character jump but having issues with the jump animation. When I hit jump, the Player goes into the air but it'll play the idle animation in the air til I give another keyboard input. If I hit jump again while in the air, it'll play the jump animation and go back to idle when hitting the ground.
In the animator I noticed that the jump animation triggers fast and seems to be overridden by the idle animation. I've loaded and compared the working final brackeys project, and rebuilt the animator nodes. The code and everything in the editor are the same but the only thing I can think of is that I'm using different art assets.
Here are the tutorials I followed.
2D Movement: https://www.youtube.com/watch?v=dwcT-Dch0bA
2D Animation: https://www.youtube.com/watch?v=hkaysu1Z-N8

Could you post some screenshots of your Animator Controller, its animation settings or code, please? I suspect it might have something to do with transitions or events.

Related

how to fix Unity 3d Jump animation?

I am new to Unity Game Development. I have a simple question but I am not getting the correct answer anywhere.
I had a player(capsule) that can jump and move. Now I have added a character to it and added animations. The walk and move animations are fine but...
My character is jumping as usual and over that, the animation of jumping is playing so It's looking like a double jump. What to do??
here is a video for better understand : Problem Video
It looks like in the animation the character is crouching in preparation before it does the actual jump. Seems like you could either start playing the animation and have an event in the animation that triggers the actual jump after the crouching is done. Or to avoid that delay, trim off or skip the crouching part from the front of the animation.

My player idle animation is playing but I cant see it when testing the game

So I separately imported the player mesh and the animation from blender. Everything is the same except, if I exported the character(mesh) again with the animation (I exported the animation only because as I said I already had the mesh) it will be a bit bigger than the one I use. I created the Animator and hookup the animation and when I play the game, I can see the Idle animation looping over and over again in the Animator tab (which is perfect). However, I don't see the animation playing on my mesh. I can provide you with additional information if it helps.

Unity 2D Animations: How to implement a jumping + shooting at the same time?

I'm trying to create my first computer game and I'm finding myself spending a lot of time trying to make the transitions between the character animations.
I am trying to make a transition from Jumping to Shooting (which have a different animation). I am making the transition from "Any State" to jumping based on a boolean parameter which is true whenever the character is in the air and I'm making the transition to shooting based on a Trigger paramter. Whenever I'm shooting with my character while in the air, it shows the shooting animation for a moment but make the transition back to the jumping animation before finishing it (I assume because it uses the "Any State" to make the transition back to the jumping animation and not the transition between "ShootHorizontalJump).
How can I make the shooting in air animation finish before going back to jumping?
Thank you for you help :)
My Animator
If you are using an animated Sprite Sheet as an animation, You can not play two animations at the same time.
Otherwise, You can use Animation Layer. It's same on 2D and 3D. Check here.

Unity Model Drifts during Idle Animation

Hi my idle animation is not working as intended. When the character is idling, it slowly moves out of place. I checked that the movement is not caused by the script.
It seems to be related to physics because when I turned on kinematics and turned off the character's collider the idle animation did not cause the character to drift. I scoured the web for similar problems, and can only think that my problem has to do with movement caused by the animation itself.
When I imported the animation from Blender I checked 'Baked Animation'. In Unity I also set 'Root Node' to None for the imported animations. From what I read, setting root node makes the animation interact with its surroundings (and move) whereas baked means the animation is purely visual. However, none of this solves the problem of the drifting idle animation. I am running out of ideas and would really appreciate your help.
I could manually freeze the position via script, but this seems like a workaround. Interestingly, when I first enter game view and the idle animation plays there is no drifting. However, after exiting a walking animation and playing the idle animation again I see the drifting behavior.
Looks like you just need to uncheck 'Apply root motion' in animation import settings (in the inspector when you clicked on animtion file).
Root motion is the main reason why a 3d model moves away from its pivot without the help of a script. uncheck it from the import settings.

Animation Synching in hand to hand fight in Unity 3d

As title suggests I am working on hand to hand fighting system. Now its just a start and I am also not professional so I have setup moves of players and enemy.
Now problem occurs when player hits enemy, it should trigger enemy "taking hit" animation. Now it triggers but both animation of "hitting" and "taking hit" at same time,so it doesn't look at it is meant to be.
So please anyone can set me on right path of what to do for like starting of "taking hit" when "hitting" animation reaches at some key frame or any other way.
I'll post code if you require but only a suggestion or link to some documentation will do.
Thanks
Probably the code is not the problem here. You should detect when the other player hits you, then set the parameter in the animator like this:
yourAnimator.SetBool("TakingHit", true);
Then in your animator, you should put the TakingHit animator and configurate the transition when the TakingHit parameter is activated.
Another thing you should considerate is that if you activate the "TakingHit" parameter bool in a loop, it will start playing the animation in a endless mode.