Questions tagged [animator]
The animator tag has no summary.
69 questions
2
votes
0
answers
117
views
How to prevent glitches in script-driven animations?
I have animations that are played via script. Occasionally, glitches occur at runtime that I can't explain. Here is an example:
These glitches do not occur consistently but appear in almost all ...
0
votes
0
answers
30
views
Android ValueAnimator onAnimationUpdate jumps animated values!
ValueAnimator sounds like an awesome way to animate values which can be used on views. But, somehow the animated values are not showing up as they should!
I used this set up before to animate a ...
0
votes
0
answers
83
views
Unable to play animation from another layer
I'm attempting to play an animation from different layers but having some difficulty. I'm trying to play animation transitions in one layer and then go back to the base layer to play an animation ...
0
votes
0
answers
46
views
What's the optimal way of reusing animation, rigs and controllers in a complex setup with multiple characters in Unity?
What's the optimal way of reusing animation, rigs and controllers in a complex setup with multiple characters in Unity 2022.3?
I've got a somewhat complex scenario:
One character that has 20 skins, ...
1
vote
1
answer
224
views
I am testing the flyweight pattern on thousands of GameObjects but its not helping save memory. What am I doing wrong here?
I am trying to understand the flyweight pattern better by trying to optimize memory usage by spawning 10000 copies of an enemy GameObject that I have which has an Animator component, SpriteRenderer ...
0
votes
2
answers
73
views
Prevent rotation after setting Human Pose
I'm attempting to move the fingers of a prefab using muscles with the SetHumanPose method. However, the prefab is rotated 90 degrees on each call to ...
0
votes
0
answers
30
views
How to implement 3rd person animation with acceleration from walk to run?
I am new to Unity and I am using dr Penny de Byl's lectures on Unity.
I am trying to use a Mixamo character. I downloaded a character with skin as an fbx file, and also added some character movement ...
0
votes
0
answers
54
views
Only 1 out of 3 Animator components react to trigger event
I have a main menu in which I want buttons to play an animation when they are held pressed and only fire it's "OnClick()" event when the animation ends. (So it's reset if you do not hold it ...
0
votes
0
answers
19
views
How to update a component field for a single player for all player views?
I'm making a 2 player game in which, when 2 players are in a room, they "toss a coin" to decide which of the two player "skins" they get.
Now, the way I built the player "...
0
votes
0
answers
28
views
How to use a key to stop playing the current animation, and replay it from the beginning?
In my Unity project, I tried to use a key to stop the current animation and immediately play it from the beginning again. I also tried to control the delay before I can press again.
The following ...
0
votes
2
answers
65
views
How to correctly add animation for a rotating object with Script?
I have the following structure of my Turret:
The Body rotates by Y and Head rotating by X via script to a target, I have created simple Idle animation for turret which rotate Body and Head. The ...
0
votes
1
answer
183
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 ...
1
vote
1
answer
157
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
407
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
42
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 ...