Camera not follow my 3d character during animation Unity - unity3d

I have a character with one animation. the animation is running. So during the animation start, my character will run one position to other position, but my camera doesnt follow the character.

Do you have a script controlling the position of the camera or is it just parented to your player object?
If the camera is parented to the player object, it'll follow it everywhere.
However, it'll follow the root of the player object, regardless of the animation currently playing. If during the animation, the player steps forward, its root won't change. The animation of an object has no effects on its position.
You should make your player move through code, not through animation. You shouldn't have any problem then.

Related

Animation changes transform when entering game mode

In my Unity 3D project I've added an animated body as a child to the Player object. The player moves as is should, with the right animations displaying for each key. The problem however is that the transform of the child changes when I enter game mode, meaning the character is walking above the ground. In scene mode it's relative to it's parent, it's grounded, but when I switch to game mode the character suddenly changes it's y-axis transform. I also checked the inspector for this object, it's y-axis changes.
I tried disabling the movement script, to check if this could have anything to do with it, but nothing changes. The transform still changes. I'm new to this problem, and every thread I've found on the topic hasn't helped much. Does anyone know what might cause this?
The hierarchy. mixamorig:Hips is the one changing it's transform. The animations and animation skin I'm using is from Mixamo.

Collider is not following character animation

I have a combat animation in my game and I want my hitbox to follow the animation. I have tried using the record feature, but it has not been working. Is there any other ways I can have my problem fixed.
Colliders get animated with the animation itself and moves accordingly. Make sure that the object you are animating has a collider on itself not on its parent.

Unity3D idle player animation overrides jump animation

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.

How do I have an animation always start from the same position on screen instead of the animation playing from its current position?

I'm working on a menu system but am having trouble with the animations.
I need to have it so that at the start of the animation its position starts somewhere else. So if the panel has moved to the right off the screen, when I hit the button it can come in from the left. Instead, no matter what I've done, the animation will just play from where ever it currently is and I can't move its position.
If you're using the Animator system, it always considers the GameObject local position.
So you could parent the animated GameObject and move it's parent around, while preserving the animation coordinates.

Need to stop SteamVR camera seeing through walls

I am using player prefab from SteamVR Plugin. Whenever player touches an object with a Collider on it, camera sees through it. I am using 0.01 as minimum clipping value. I have also added Rigidbody and Collider on camera.
I also do not have code currently but here’s a concept of how to approach the problem:
Keep a trigger collider on the camera.
Write a script that detects when that collider is within another collider (your walls). There is a method for checking if colliders are intersecting/overlapping
If there is an intersect/overlap, fade the camera to black. If there is not, fade back.