Questions tagged [animator]
The animator tag has no usage guidance.
60
questions
0
votes
1
answer
73
views
Animations don't transition when prefab instantiated by code
I am working on a script that responds to the player pressing a button by instantiating a prefab into the scene.
The problem is the animation is not working on the spawned prefab. The conditions of ...
0
votes
0
answers
34
views
Unity Preview from a specific blend tree animation to another animation
I have a blend tree that switches from Idle to Walk to Run animations via the ...
1
vote
1
answer
91
views
How can I fix this NullReferenceException error while all the references are set to specific objects?
I'm currently working on a boss fight for my game.
My problem is that I keep getting a NullReferenceException error that prevents the boss (named The Smallest Stain)...
0
votes
2
answers
62
views
Make a script move a game object's transform when it has an animation
I am working on a melee game project, and i have a gameobject which holds the weapon, and it is what moves when i swing the weapon. It has an idle 'animation' (its just one keyframe of the idle ...
0
votes
0
answers
37
views
What transitions and triggers should be used in Unity Visual Scripting for an Animator with two main states that toggle back and forth? [duplicate]
I'm using Unity Visual Scripting and have a GameObject with a Sprite Renderer and also an Animator component with 3 states: FadeIn, Fadeout and Idle.
The main goal is to control the alpha transparency ...
0
votes
1
answer
60
views
How to sequence Animators for a list of GameObjects in Unity?
I created a Prefab called White Letter and added an Animator to it to create the illusion of falling letters.
I use this Prefab to generate words; here's an animated gif of what it looks like in ...
0
votes
0
answers
465
views
How to play animation clips (.anim files) through a script (without Animator, Animation Controller)
I'm making a custom sprite-based animation system.
basically an "animation component" (legacy) with more features.
I want to create my animations within the Unity animation window, which ...
0
votes
1
answer
574
views
What is ApplyBuiltinRootMotion and how to use it?
The character in my game has humanoid feature. I have unchecked "Apply Root Motion" in Animator component and use scripts for its movements. I want to implement a Ledge Grab Jumping movement....
0
votes
1
answer
155
views
Smoothing transition between Animator and script controlled character
I have a NPC which has a strict match logic (bot player), and I am moving it on FixedUpdate(),
However, on certain events in the game I am activating animations ...
0
votes
1
answer
351
views
What's "isMatchingTarget" in Unity?
I came across this line of code below.
What the boolean "isMatchingTarget" is used for?
...
0
votes
1
answer
135
views
Implementing the integration workarounds for AnimationRigging and Animancer
I am working on a project using both Animancer and Animation Rigging. They mostly work nicely together, but, as described here, there is one problem: When you add a new ...
0
votes
1
answer
31
views
Animation of front and back part of a prefab separately on unity
I'm trying to animate a platform front and back.
Because, when my character will be on it, it want the front of the platform to be in front of the character.
Here is what I have so far :
The thing is,...
1
vote
1
answer
613
views
Animation clip that acts relative to the object's current position
I am making a 2D game in Unity and I want to create an animation that works with any object and takes that object's position into account.
The animation should be a little bounce, basically move it up ...
0
votes
1
answer
328
views
AnimatorUpdateMode.UnscaledTime not working
So using what I found on my other question, I wrote this code:
...
1
vote
1
answer
798
views
Forcing animations to play in real time, ignoring time scale
When the character dies, an animation plays, and then the scene resets. What I want is that nothing moves/animates except the character and the life bar so I use ...
0
votes
0
answers
56
views
replacing an animation with another one - unity
In Unity, When moving from one animation to another, I want the second animation to not start from the beginning and be a continuation of the previous one (For example, if there is a change in the ...
1
vote
0
answers
182
views
Using an Animator State as a Switch with no Animation
I have the attached portion of a sub-state machine in my animator. The parent layer is connected to the states "Standing" and "Prone Idle" using transitions with conditions "...
0
votes
1
answer
748
views
Why is button component's animation transition just working for some buttons?
I have a main menu scene in which the buttons work using button component's animation transition. I created a simple animation for them that changes their vertex color to blue when selected. The ...
0
votes
0
answers
61
views
Why does this work but this doesn't even though they are the same thing?
In my game I am trying to trigger the death animation but it doesn't work when I use anim.SetBool("isDead", true); however when I use ...
0
votes
1
answer
1k
views
How can I create a animator parameter in a script, unity?
In unity we can create parameters in the animator tab to help to control changes in animation. I'm able to create this parameters in the unity itself and manipulate them in the C# script, but I want ...
1
vote
1
answer
926
views
Animator stuck in previous state and not transitioning, even if transition condition is true
The animator of my character gets stuck from time to time into the first attack animation instead of transitioning to the next one, even if the condition of transitioning is met.
This problem gets ...
4
votes
2
answers
11k
views
What does "Write Defaults" in the animation state inspector actually do?
In my Unity project, I had an issue recently where a tool which autogenerated animation controller layers caused issues with existing layers because it was generating layers with Write Defaults set to ...
0
votes
1
answer
157
views
Trying to access existing animator SetTrigger does nothing and returns error
First of all, I have a character with 2 armatures (Upper/Lower Body), where the Upper Body is the child of the Lower Body's root bone (Hip). This is intended, and I really don't want to touch the ...
0
votes
0
answers
26
views
Move animation bones hierachy
I took an asset from the asset store with some animation.
The animation expect the Animator to be put directly on the object that contains all the bones.
=> fbx (with animator)
=> bones
I would ...
0
votes
1
answer
837
views
Unity Animator Ignoring "Higher" Layers
I have a rather rudimentary layer set up:
Lower Body: no mask, full weight, override.
Upper Body: upper body mask, full weight, override. This works as intended.
Standing Up: full body mask, full ...
1
vote
0
answers
166
views
Turnaround animation
So I have a Moose with 3 animations: idle, walk, turnaround.
Idle and walk are mostly self explanatory while the spritesheet for the turnaround animation looks like this:
I set an animator with 3 ...
1
vote
2
answers
344
views
How to check if gun may shoot again (because animation has stopped playing)?
When the user presses the fire button, I set a trigger:
_animator.SetTrigger("HG_Shoot");
This trigger causes a "pistol shoot" animation to be ...
0
votes
1
answer
1k
views
How can I disable an Animator from the Animation in Unity?
How can I disable an Animator from the Animation in Unity?
The Animator enablement checkbox seems to be highlighted, which makes me believe that the enablement of the Animator is an animatable ...
0
votes
1
answer
43
views
Why does Animator component prevent the player from facing left?
I'm making a 2D platformer with Unity. A few days ago, I was testing the game; the player could face right and left based on its moving direction and animations were playing correctly. I exited ...
0
votes
3
answers
129
views
How can I play an animation as long as the player is on the pressure pad?
I'm making a 2D platformer with Unity. Recently, I implemented a pressure pad system. Basically, when the player triggers the pad, a door near there should be opened. The system works properly but the ...
0
votes
0
answers
17
views
How would I use an object from another animation in Unity?
So I have two different .blend files with two different animations. Let's call my aiming with a gun animation animation A, and my other .blend file with idle, run, and jump animations animation B. If ...
0
votes
0
answers
476
views
How would I edit .anim files in Blender?
I absolutely cannot stand animating in Unity.
I am making an FPS game with many weapons, and each weapon has four animations: running, jumping, aiming, and shooting. I would like to create a .anim ...
0
votes
1
answer
65
views
How would I add keyframes to my animation clip from another object in Unity?
I am creating an FPS game which will have many weapons that have their own animations. I will need to access keyframes of the character's position, rotation, and scale, how will I do that? I can only ...
0
votes
2
answers
240
views
Unity Animator not animating player, but following transitions perfectly in Animator Window
I am trying to animate a model in my project, and although I have been successful doing the same in other projects, I am not succeeding in this one.
The model does not seem to animate, although in the ...
0
votes
1
answer
346
views
How do I set decimal values in 1D blend tree?
I have created a 1D blend tree.
It is being used for a 3rd Person Controller.
The blend tree consists of 3 animations:
aim pistol down to the floor
aim pistol at middle of the screen (straight ...
0
votes
1
answer
224
views
How would I have multiple keys control one bool in the Animator Control?
I have been working on an update to my game. I want to add a Third Person Character Controller. I have the basic Third Person Character Controller and a basic script that works with the Animator ...
0
votes
0
answers
25
views
Unity Animator not properly following animation transitions
I have an Animator that has 3 different states. Walking, Climbing, and End of Climb.
The diagram is shown below:
I have 2 bools, isClimbing and ...
0
votes
0
answers
189
views
Animation doesn't play in one state
I have created an Animator and two sprite-based Animations. Both Animations preview correctly. In the Animator, I have created two states and two transitions between them based on a Boolean parameter. ...
1
vote
0
answers
48
views
Ethan does not run
I just imported Ethan - the third person character to my Unity 2019 project and I moved him around a plane. But for some reason he doesn't run, only walk. I logged the ...
0
votes
0
answers
13
views
Unity animator causing lights to turn on sluggishly?
I've got lights on a vehicle that I am controlling using several animations. I have an animator with multiple layers and everything works properly. However, I am having an issue where the lights take ...
0
votes
1
answer
560
views
Animator State does not switch immediately through code, even tho all transitions have "Has Exit Time" checked off
first of all, this is my code, I'm prototyping a state machine using Unity Animator (First Time) and I'm stuck coding a simple burst of speed.
...
0
votes
1
answer
49
views
Animation is delayed after few play attemps even though all transition times' are zero
I am trying to play animation forward and backward when player press the same button again and again. I have a straight line and I want to convert it to 8 while moving it. I want to play animation ...
0
votes
1
answer
1k
views
When importing Mixamo animated characters into Unity, they come without avatar?
I'm using Unity 2019.3.3f1. I create the character in Adobe Fuse. I uploaded it to Mixamo and choose an animation. I then downloaded the fbx for unity file. When imported into Unity, it is visible ...
0
votes
0
answers
794
views
Animation shown as playing in the animator, but it doesn't show in game (Unity 2D/C#)
I have an Animator on this gameObject. The Animator hits one state when some parameters are true, it can transition to this state from any state. The parameters are fine because i can see in the ...
0
votes
0
answers
66
views
Animation for some reason doesn't trigger after death
So I am trying to trigger this explosion animation after this enemy dies, but for some reason the animation doesn't trigger. I've made sure that the explosion animation is linked to "Any State", and ...
0
votes
1
answer
221
views
How to reach IK Pass and weight by script?
I need to reach IK Pass box, and control the weight by time from 1 to 0. I tried GetLayerIndex and did not give me any of those options.
0
votes
1
answer
1k
views
How to make an animation play when a button is pressed once?
I have added an idle and jump animation to a character in unity. I can make the animation happen when the button is pressed. If the button is up middle at the animation the character goes to the idle ...
1
vote
1
answer
765
views
Does Animator.SetBool take precedence over Animator.SetTrigger in Unity's Animator?
I've got an Animator with transitions from Idle to Walk or Dash. Walk requires isGrounded to be true and a float MoveX to be greater than .2. The Dash animation requires Dash trigger is returned. In ...
0
votes
0
answers
24
views
How do I create a simple animation for use in Unity?
I'm trying to create a simple shrinking animation for use in Unity. The goal is to create an animation that shrinks the object to be 0.1 scale.
I've created an Animator Controller with an empty state,...
0
votes
0
answers
239
views
Multiple updates for Unity animation per one method call
I'm trying to do some simulation where I move objects procedurally in a loop within one method call. So instead of using Update(), method I do for example:
...