#🏃┃animation
1 messages · Page 38 of 1
Hey guys I need help setting up animations on unity , for some reason when I try to put it the models won't move at all , I thought it was because of the models I'm using but no it won't work with a mixamo model I got
what's the best practice for handling the "middle state" of a blend tree for movement? going from walking forward to walking backward, there's this awkward jitter when the blend tree passes through the idle animation between the two.
I think there generally should be no jitter in that situation
If there is it could mean the blend value is changing too fast, or that the animations don't match each other in pace and or pose
You can smooth the blend value, rather than using speed directly for it, for example
But depending on the cause of the jitter there could be many ways about it
Blend tree animations should have the same frequency of steps so the pace matches
The idle state doesn't necessarily have to be in the same blend tree, if you blend to/from it separately, instead using a more neutral pose between the movement directions
It’s a directional blend tree, so I have four directions. But there’s a center value at 0,0 that either needs an idle animation or no animation at all
With no animation it causes issues, with an idle animation its still a visible transition
Because in order to go from walking forward to back or left to right it has to pass through the center
The blend value is smoothed, so it’s not like it’s snapping to another animation, it’s just that it has to make a pit stop at the idle animation before it can go anywhere else
If that makes sense
add an animator to them
AddComponent > Animator
then you need to create an animator controller...
Let's learn how to create an animator controller in Unity! Animator controllers control the logic behind how animations work and bridge the gap between player input and code. This is a Unity tutorial for beginners, so no worries if you're new to the game.
FREE Character Assets:
Low Poly Chicken: http://bit.ly/3k3Y3oY
Lovely Animals Pack: http:/...
look, she's hot and it's only 5 minutes
Im trying to activate this function in a animation events, but even though its printing correctly the object is not moving. When calling through the update it works fine
{
print($"calling movement {x}");
Vector3 pos = gameObject.transform.position;
pos.x += x;
gameObject.transform.position = pos;
}
private void Update()
{
if (Input.GetKeyDown(KeyCode.Tab))
{
RootMovement(2f);
}
}```
Am I crazy or was there some talk of an animation controller "prefab" for unity 6, that supposedly let you template anim controllers? I can't find any details on this anywhere now
None that I've seen
A wholly new animation system was showcased at the time of U6 release, which may have had something of the sort
However that is something you can do with the current Animator via the Animator Override Controller component
Though I don't know if that workflow has all the functionality that you have in mind
Oh I see, thanks I'll take a look
hey i need help with something simple
so i got some animation parameters that is Set to true in the script
but they only work whenever they're in the Loop state
is there any way i can go around this?
i feel like its easy but i can't find it
how exactly do they "not work" in other states?
also, are you aware of trigger type parameters
i got a script in the OnTriggerEnter2D
they need to set the Bool to true whenever the bullet hits the specific part of the body
so they play a specific animation
if i shoot the Torso it plays the animation
but if i shoot the head it won't play the OnHeadHit
only if its on loop
which is not what i want
well, do you have the proper transitions to allow that?
show your animator?
sure
the thing is
its not even called if its not on Loop
so if i hit the head after the torso
you sure it's not just pingponging back and forth between torso and head hit animations?
the OnTriggerEnter won't execute
the print("head"), you mean?
well the conditions you showed here don't really make sense
it works
the problem is in the animation
sorry
it does work
they can both be checked individually
but once the animation change
but you aren't getting the print("head") log when the head is hit?
if the animation is in loop
i am
and if it isn't, you aren't?
so the code doesn't work
read the code again, what does it actually say
the code does print the head and the torso
but once he plays the animation
it only identifies the torso code
if its not on Loop ^
so i think it has something to do with something in the animator
dude, read your code
what does the condition say
it doesn't actually check for any info about the collision
yeah but it's not asking about the collider that got hit
it's just asking about a random collider
one that's presumably statically set
you are doing nothing with the collider you hit
this is roughly equivalent to if (true)
or if (false), if those objects have the wrong names
public bool IsNegative(int number) {
return unrelatedVariable < 0;
}
same premise
the script is attached in the colliders
its asking if the collider has that specific name
full code
ok so headCollider and torsoCollider will be the same one
and also, each head and torso has its own animator?
what is your setup here?
it sounded like you had a single central animator before
i need them to be their own thing
you want me to record what's happening?
i think im not being clear
no, i want you to describe your setup right now
what do you mean by setup?
how many animators, colliders, and gameobjects do you have, and how are they linked
ok
each body part has its own collisions
right now i only got the HeadCollider and the TorsoCollider
right now i'm trying to get the animations to work
the bullet identifies the torso and the head as their own collision
do the 2 Animators have their own AnimatorControllers?
so the head collider also has the torso animator controller?
so you have 2 of them, that both control all the animations?
yeah that doesn't particularly make sense...
no
sorry, phrased that poorly
no worries
you have 2 instances of the same animatorcontroller
one in the torso, that controls everything
one in the head, that.. also controls everything?
nope
the controller
is only in the torso
which is the father of all the other limbs
the script only gets the Animator
so the HeadCollider, has a CowboyControl, but not an Animator?
the script has a public Animator anim;
the HeadCollider does have the anim;
every script that is attached to the CowboyControl
has the anim;
which is the "torso" (animator controller)
i really need to change the name
lol
ok you're just not making sense now
every script that is attached to the CowboyControl
this is not a thing
sorry
does the actual object HeadCollider have a component Animator
every game Object that the CowboyControll is attached
has an animator?
ok, you're overriding that to null in Start for most of them though
if they don't have their own Animators
ok put the prints before the setbools and see if there's a difference there
and make sure to save and recompile first
right
i made 2 vids
this one is to show that the OnTriggerEnter2D is working
woops
welp
give me a minute
now when i add the bool
@sterile vine
is it not possible to use a single animator for all my enemies if they have animations embedded in them with the same names? is there not a way to have animator states that just pull a model animation?
is that just what override controllers are for?
An animator is the state machine that runs animation clips
Animation clips modify properties of components in the gameobject hierarchy, by explicit name path
So as long as there is an exact match, the same clip can be used by any kind of character
If the hierarchy, gameobject names, components or intended animated values are different, you can make new clips but re-use the animator state machine using the override controller component
If they are Humanoid avatars, they can have different shapes but share the animation clips using "retargeting"
i dont want to use the same animation clip for enemy A as for enemy B, it may look completely different, but they have the same name slots on every model i'm gonna make. is it actually possible to just call the clip by name then (without using c#)? because this is whats throwing me off
one is the unity animated version, one is the clip thats on the fbx
under "motion" it seems like i have to differentiate between them though.
unless i use an override controller
although all of the models that derive off "grunt.fbx" can obviously use the same clips, i'd just have to use an override for a different enmy model with different armature?
I don't think you can call animation clips
You can call animation states of the animator directly, or play them via parameters
Override controller component lets you swap the clips/motions in the states
yeah, and those are linked to a motion thats a specific clip right
i meant to circle the motion field in the top right of the first image
i guess i had this idea i could just say "play whatever the model's attack01 is"
but if thats not how it works i may as well name them with the enemy base name instead so its easier to find
You'd play the animator "attack01" state
Each character can use the override controller to replace what motion that state has with whichever fits it
So the code doesn't have to know about the animation clips at all
yeah, so i need an override controller is what i was asking from the start lol
but good, thanks!
Yea, probably you do want that
But understanding how exactly animators and clips work could be more important first ^^
i'm relatively new to unity in general so i'm still getting my head around a lot of it. more like i just dont know what all the tools are available
Hi guys i got an issue with animation rigging damped transform, when i set the damp position to 0, instead of what it said in the API: " If set to 0, the Constrained Object follows the Source object's position with no damping." it still stretches the entire model out when im moving the model, found a similiar thread on the unity forum but unfortunately no solutions: https://discussions.unity.com/t/damped-transform-stretching-issues/888511
can i use mixamo with a generic charachter or what do i need to make a charachter humanoid?
The only real solution is to make your own damping script, which is unfortunate but luckily those are pretty simple
That particular issue won't be fixed because they're focusing on the new animation system now
oh alright, how can i make my own damping script? im kinda new to this
There's a few parts to it that you do need to know
- How to make scripts that manipulate gameobject transforms in general
- The math of smoothly manipulating a position over time to decide what kind of damping behaviour you want exactly, SmoothDamp and MoveTowards methods could do a lot of the work here but they produce different results
- How to apply that damping in a way that doesn't conflict with your animator or animation rigging constraints. At minimum that means running your methods after those components (in either LateUpdate or later in script execution order whichever works), but if they also cause accumulative changes to the transforms then your damping script may work on unexpected values and/or they may end up in a feedback loop between each other
Depending on how unfamiliar you are with these things, it could be a difficult task, but only because of foundational knowledge requirements rather than complexity of the task itself
Alr tyyy
I have a 20 frame character animation. If I export the animation and play it in Unity using Humanoid, the keys for the animations are off (hands not in the right positions, etc.). If I export only the last frame and drag that into my scene, everything is positioned correctly.
I'm using an animation controller to play the animation. Is there something in the controller that I need to setup to get it to play the animation in its entirety, or maybe on the animation itself? On the animation I tried checking the boxes for 'Bake into Pose' on Root Transformation Rotation and Positions, it helped but wasn't exact.
In the image you can see where the hand should be vs. where the hand is after the animation plays the 20 frames.
Thanks.
If I convert the animation to legacy and play the clip, it matches correctly. For whatever reason changing the fbx to Humanoid is causing my issues. I do not see any import warnings under Animation > Import messages either.
I'm having a left and right directional animations based on a direction vector and for some reason even when the blend state is mostly on the "left" its flipping the sprite. It might be an issue with how the animator stores bools as ints/floats and rounds them? idk. Really annoying, wish there was a way to just make it select the closest animation in a blend state
solutions that would technically "work" but I would consider workarounds
- animation overrides. This is fine for this example maybe but it doesn't really solve my problem, as I'd rather have different states switch between animations differently (you'd have to commit to left/right or all 4 cardinal directions) It also now makes me have to manage more than just the animator parameters
- snapping the values of the floats. again this would technically work for this example but id then have to snap the floats differently depending on what kind of animation is going on at a given time. I can't just pass in the values and let the animator figure it out (like it should work)
I guess I could set the thresholds really small
a workaround but without a ton of side effects
does the 'samples' box mean frames/sec or something else? i just know it affects speed
Hello has anyone been able to download or buy basketball animations in Unity or Fab store? Recently bought one but don't know how to incorporate the ball animation in these animations. I already have the ball object model, I just need on how to do the ball animation.
I'm willing to pay who can help me with this. Thank you!
Hello! I changed Unity in my project from 2018 to 2021 and my animations are sometimes broken. Pivots are messed up or something. :/ Does anyone know why that is and how to solve it? Old vs new in screenshots:
also should i even use this legacy component, my object is a chest that just wait for a open animation only
nvm "Legacy is still available because it is easier to use and provides better performance for simpler animations." got this from unity doc
but does the legacy animation component not allow play animation preview on the animation window?
oh sprite does not work with the legacy animation
After changing animation rigs, I now have an unacceptably large CPU spike every time a character is activated. It's this + another 14ms for another thing that calls SetupAvatarDataSet
Guys I have a simple quick question, when using the timeline, I want to be able to apply an easing function to one keyframe, like those we have on presets, is there any way to do that without I haveing to manually tweak the curve shape myself?
This was 3ms with the old model, which used the same rig but exported with Maya instead of Blender 
Animation performance also seems degraded
Why my animation playing so strange?
how could we know from the information you've given us
Guessing because the mask doesn't include all the bones the animation requires
Hello, is it possible to swap the model of an animator keeping the same bones transforms?
Like, dynamically from code changing the Animator avatar, skinned mesh renderer and the bones transforms values so they suit the new model values?
or is just now how that works
whats the best file option to export a 2D animation
From where to where?
aseprite to untiy
Either as .ase if using the aseprite importer, or export a sprite sheet png and slice the sprites in unity
Yes, I believe a skinned mesh renderer can swap the mesh it uses if the vertex groups match
Animators work with any gameobject hierarchy as long as the names and paths to components match exactly
But if the proportions of the characters are different, it won't look right
If they use the Humanoid avatar configuration, "retargeting" can be used to adjust the proportions so the animations work across all characters
If the proportions are different but not humanoid, you may be looking at coding your own retargeting system
They are both humanoid and have the same animator controller which looks as it should be. I have this code to preform the job but it doesnt seem to work, the model breask totally, is there something i am missing? How do I implement that retargeting logic u mentioned?
public void SwapModel(GameObject newModelPrefab, GameObject oldModel)
{
GameObject newModel = Instantiate(newModelPrefab);
newModel.SetActive(false);
SkinnedMeshRenderer oldRenderer = oldModel.GetComponentInChildren<SkinnedMeshRenderer>();
SkinnedMeshRenderer newRenderer = newModel.GetComponentInChildren<SkinnedMeshRenderer>();
oldRenderer.sharedMesh = newRenderer.sharedMesh;
oldRenderer.materials = newRenderer.materials;
Animator oldAnimator = oldModel.GetComponent<Animator>();
Animator newAnimator = newModel.GetComponent<Animator>();
oldAnimator.avatar = newAnimator.avatar;
foreach (HumanBodyBones bone in Enum.GetValues(typeof(HumanBodyBones)))
{
if (bone == HumanBodyBones.LastBone) { continue; }
Transform oldBone = oldAnimator.GetBoneTransform(bone);
Transform newBone = newAnimator.GetBoneTransform(bone);
if (oldBone != null && newBone != null)
{
oldBone.localPosition = newBone.localPosition;
oldBone.localRotation = newBone.localRotation;
oldBone.localScale = newBone.localScale;
}
}
Destroy(newModel);
}
You would also have to swap the Avatar, for sure
But I really don't know what's required to "hot swap" avatars like that
I'd avoid doing it at all if possible
Rather instantiate or disable+enable a new skinned mesh renderer and animator avatar combo, matching the animation state and IK instead
Wdym by "animator avatar combo", the model prefab itself?
and will that keep the same bones gameobjects?
Not "same bones" but if the animation state and time are the same, it would be close enough for most purposes
I don't know what you're doing precisely
A whole character is usually a prefab that has a skinned mesh renderer, a bone hierarchy and an animator tied to that bone hierarchy
The animator needs a reference to the correct Avatar to use humanoid avatar features like retargeting
I have a ragdoll inside the model which has custom scripts and stuff that needs to be left where it is
Its like wanting to change the visual mesh model, but not the logical hitbox model
It sounds like you should be able to simply change the mesh of the skinned mesh renderer component without touching any bones at all
If the new mesh has different proportions or otherwise different skeleton, it's hard to imagine how you expect to be able to change it without altering the hitboxes
The mesh has indeed different proportions, thats the reason behind wanting to adjust the bones transform values
However im currently trying another solution based on moving the components from the old model to the new one but is way harder
Since it's a ragdoll I'm not sure the retargeting stuff even applies here
It's for animations
I mean "ragdoll" is just a group of rigidbodies, colliders and joints, with a custom script to allow subscribing to collision events in order to handle body part damage
Assuming you want to preserve the pose the ragdoll is in, I don't expect it's a simple task to change the proportions at runtime
Also assuming you don't want to freak out the physics when doing so
Oh, the ragdoll is usually disabled, the animator controls the movements of the character until it dies, thats when the animator gets disabled and the rigidbodies stop being kinematic so the guy falls to the ground
its not an active ragdoll, just a gimmick for the dead state and handling body part damage
hey guys, i need some help, i have a 2d game and i need 2 animations:
1: flaming animation
2: freezing animation
if someone can help me i would be really happy🙂
The problem is that you're blending between 0 and 1
for false and true
Any value above 0 becomes "true" when animating a boolean
(as in, the two animation clips have values of 0 and 1 -- not talking about the thresholds in the blend tree)
You can get around this by blending between -1 and 1
ty!
how do you set bool values to -1 in the animator
select the animation clip directly in the project window
that will let you edit it without the context of an animator, so you'll just see the raw values
although, i haven't actually thought about what happens if you animate a bool with a negative value; i'm almost always doing 0-1
yeah this solution has issues too
what is it doing?
you can't animate in context
and if you try to touch the parameter it snaps everything to 0 or 1
ah, yeah, that'll make it too cumbersome
well, you're using a blend tree
im using the only tools the animator has
it linearly blends between several motions
2D unity devs are the most oppressed class
seems like im fucked
I either make all my own tools and systems or use workarounds that have issues
is there any sort of middle path where I can add the functionality I want to mechanim without killing myself as the solo engineer on this project
Hey everyone I am new to unity (completely new) and have to do an art test for a company with 2D animation. I am a maya animator so I know how rigs work but I am just confused how to move the characters and use key frames. are there any rigs that I can use as a beginner? If anyone can explain it to me that would be a huge help. Thanks!
I managed to convert the idle animation from Sekiro into an FBX and tried to import it into Unity for retargeting for humanoid rigs. While I think the rigging DOES at least work, the animation definitely does not play properly and the only reason I can think of is that the rig on the animation I imported isn't quite humanoid despite most definitely coming from a humanoid character. Is this a thing that can happen? And, if so, how would I go about modifying the animation's rig to more accurately register as properly humanoid?
what is the best startup to learn animations for mobile game? (i mean optimized and efficiently)
You can select one and duplicate it to separate it from the asset
I want to export them out at fbx files
So each animation exported separately as fbx
@twin musk
I tried exporting the model using fbx exporter with the animations but for some reason the anims breaks
Does Unity 6000.0.39f1 have an issue with unskinned rigs and animation? If I import a humanoid animation with a mesh on it, it works fine, but if I import the exact same one minus a mesh, bones seem to get all messed up. (images are with mesh/without mesh respectively)
why is this triggering the animation in the beginning instaed when the player dies/takes damage
1st image is the enemy
2nd image is the player
3rd image is the code
this is all we are missing to finish this project and i got no idea on whats wrong
check your transitions
I'm really confused and can't find anything about this, so I'm here to see if anyone has ever seen this or can shed a light...:
I'm using Timeline to make an intro cutscene to my game. Everything is going really well and I pause the cutscene occasionally to show dialogues or whatever needed as well and there is no issue there, except closer to the end of the Timeline.
For some reason, when I call playableDirector.Pause() near the end, one of the controlled objects gets its position changed to the parents position with no command to do so, and is moved back when Resume is called.
If I remove the Pause, the position never changes and if I call the Pause later, the position is changed later, which shows me it's not something in the object's animation track...
The script that pauses it is literally just a playableDirector.Pause(), there is no other instruction on it, and the object that is being moved does not have a script or anything else controlling it.
It's just one object that is moved to the parent's location
There was another one that stopped being moved when I removed a collider. From my understanding, when I paused the Timeline, the Timeline would stop controlling the objects and physics would kick back in.
When I removed the collider, this second object started being moved instead.
After hours on it, my mind is just too erractic for me to try to find the cause 🥲
In that case I don’t know, it has something to do with your modelling program
hi, i have a problem where i "die" animation is mixed with other, how to stop all animations?
Can you give us some more context? Or a screenshot or video
0:15 is when the enemy die
Can you show a screenshot of the inspector for the transition "Any State -> Die"?
1sec
its not just during attack
its also if he walk and runing
walk anim while dying
Remove the Exit Time for the transition for all Previous source states
Sorry
Not the exit time, the other timer under Settings
Fixed Duration/Transition duration, both under settings
ok checking
I usually remove the Exit Time value (set to 0) even when I uncheck Has Exit Time because I always feel like it maintains despite unchecking it. I think it was a bug in previous versions and I grew used to zeroing it
Nice
i was trying to fix it for almost 2 hrs
hey so i have a question about animating using bones in Unity. Ive done this before and never had any problems but suddenly somthing isnt wokring. I'm importing my file as a psd but Unity doesnt seem to be recognizing my file as having mulitple layers. and when I apply bones to it in the skinning editor, the bones dont show up in my scene (even after hitting apply). I can send pictures if my descritpion is confusing
like the plant on the left works fine and imported correctly but the one on the right is only being registered as a flat image
omg nevermind i was just being dumb
Glad I could help 🙂
thank you for helping 🙂
btw is there a way to call a func during a specific time of the animation?
There is. On the animation you add an AnimationEvent. The animated object needs to have a script with a method with that name. Let me find something more specific as I'm at the car so I don't have these info on the top of my head 😂
I got animated sprites from aseprite, how do I manage animation changes so my characters animates correctly
is it possible to flag an animator to cull animations completely but make an exception for one specific clip?
also will leaving all the duplicate animations on my model's when import from blender be a problem in the long run? i just realized all my variants are fine using the first one's animations
but now they all have 12 animation clips in the unity search prompt that aren't actually in use
I don't believe they're included in the build if no animator or animation component uses them
However you can also disable animation importing per-mesh, as well as remove clips individually from the animation list per mesh from mesh import settings
Have you tried using the Physics Debugger? Anytime something that has physics components is overridden by something else strange things can happen.
I made a time machine where I could record objects as they move forward in time, then the player could pause, rewind, fast forward and scrub frame by frame through the timeline. Anytime I diverge from the live time in the game, I record the state of any rigidbodies and set them kinematic so I can mess with them. But when I eventually sync the recorded data forward back to the live time, the objects would suddenly lurch. After hours of troubleshooting the physics debugger immediately showed what was wrong. The rigidbody didn’t rewind in time and it didn’t stop even though it was set to kinematic. It would simply complete its physics and come to a rest. So when I would sync back up the visual object would snap to where the rigidbody now was - not where I left it.
Hello all, not sure if this is the right channel so sorry in advance if it isnt. Im just wondering if its possible to organise animations into categories so i can avoid this:
So... When I import my character from blender to unity,some of her parts got dislocated, anyone know what is the issues and how I can fix it? I have a feeling that is cost by the IK
if your rig is using a bunch of special bone modifiers or blender-specific functionality, it won't import correctly into Unity.
Can also happen if your transforms aren't applied in blender
give them prefixes. If you really want to avoid a long list like that, don't import all of them in a single file.
umm how do you import in multiple files? :S
I have a rig and animation that I have saved as a .3ds file but, when I import it into Unity, I can't find the animation anywhere. Is there a reason this might be? Because when I open it up in 3ds the animation is right there and playing.
hi, i am trying to and methods to animation but they are not called
the enemy(gameobject has the script)
I got 2d 3 jump sprites one for the jump one for the jump at its highest point and 1 for the fall how do I make them work together
you could set transitions that check the current y velocity, for example
How do I get a rotation to stay in place after moving onto the next clip ?
Root motion is the feature for this
If the turning animation rotates a root bone, that can be interpreted as persistent transform rotation if root motion is enabled
The setup may be different for humanoid and generic avatars, though I'm not very familiar with it
I did try with root motion ticked, it didn't make a difference
Maybe I need to set this?
There has to be rotation in the clip on a root bone, and that bone has to be set as the Root Node of the avatar
ah, and there's no avatar assigned
Can't tell just by looking if the turning animation also rotates a root bone, or just the character's limbs in hierarchy above it
is there an easy way for me to tell? A gameobject called Root_M has the rotations updating all the time
Sounds right
I set the root motion node as that, but it didn't make a difference - I'm assuming now because there's no avatar assigned
There probably has to be one, since avatars have their own root node settings
If the animator is successfully reading root motion from the clip, Apply Root Motion will then move the animator's own transform, or possibly a parent rigidbody if it finds one
That could potentially conflict with movement scripts you have
there aren't any other components on it, it's just the animator for moving it
Oh and despite here being a transform called root, it's not necessarily the root the character was animated to move relative to
That one could be deeper in the hierarchy
Usually it's the first parent of any limb specific bones
Seems to be it
If I set this back to <None>, then these appear
this is in the 'animation' tab, a root node is still set in 'rig'
I think those should be optional, and a lot of them specifically for Humanoids
I've unticked 'Import Animation' anyway, there aren't any included with the mode - they're all separate files
I've given up - I just won't have it turn
Did you add that script to the same GameObject that contains the Animator? (it has to be the same GameObject, it can't be a parent or child)
hi, i've already got it fixed,but i have new problem
1sec
when the animator enabled the avatar is floating
he is 0.98 above ground
So... I fixed the issue, kind of......
For some reason, if I enable "Force Start/End Keying", all animations will exported correctly.
What could be the issus?
Are you using Navmesh? Or Collider+Rigidbody?
yes, Navmesh, but not on the player
Expand the Capsule Collider there, select the player gameobject and click to display Gizmos with the player selected and send a screenshot, please 🙂
Center the collider so the bottom part matches the model and let me know if it worked 🙂
ok 1 sec
doesn't seem to do anything
Does the Character Controller have an offset property of sorts?
You have a few colliders there. What is the round one at the bottom? Is that a trigger or an actual collider?
i dont think so, the player still floating even if it disabled
its a gameobject(groundchecker)
i've disabled it still having this problem
What if you disable the capsule collider? Just for testing
Does it go through the floor? I don't see a Rigidbody applying gravity so I'm trying to figure out a bit of context
I never used it, my bad 🙂 Move the center of it to match the character
nope, still floating
update : its happens when i start moving, if i stand or attack im staying on the ground
Hm
What is the Player movement script like? The part that moves the character
sorry if its too small, let me know if you want bigger screenshot
i've removed cc.height both, didnt work
its seems to be working, but i dont know it its the best way
Can you show me this line in full?
Ah, I see 🙂
I can't really say anything about that as I never used it, let me see if I find anything 🙂
hi, i'm trying to figure out character movement and idle/running animations with the animator transitions, I added a basic movement script to the character and when trying to add the animation states the character immediately goes through the animations to the running animation and wont go back to idle even if I don't press any of the movement keys but the animation states are working properly from what I can tell in the animator window when moving about
Is there an event (or something else) that can be put on an animation/ transition to change a parameter? Or does this need to be coded?
To go from idle to attack a bool is set true, I'd like it set to false after the attack
An event in an animation, or a State Machine Behaviour for a specific state
Both of those require coding though, the animator itself cannot change parameters, so in many situations I think the code that sets the bool to true might as well be responsible for setting it to false unless it specifically must wait for a specific state
Trigger parameters could work here as they are functionally bools that are automatically set to false, but only if the transition is not interrupted
If the transition is interrupted it gets stuck on and must be Reset
ah, I've been using bools - triggers will probably be the better option, cheers
I was able to find the cause, thanks 🙂
For some reason there was an Animator controller assigned to that one particular object so when the Timeline was paused, the animator controller took over and that caused the issue.
I just removed the controller and left it as None and it was fixed
Hey, I just have a question about somethings that I animated using bones. So i have the asset fully animated and turned it into a prefab. I have mutiple of this same item in my scene but the only problem is that they all play the animations at the same time. Is there any way to stagger these animations so that I dont havew like 4 trees moving the exact same way???
https://paste.mod.gg/
idk what the problem when i click to hit or do a combo its stuck at the 1st hit animations here is the code if needed
A tool for sharing your source code with the world!
Hi guys, quick question, I have my character imported as generic, and to for example for aiming I use two bone Ik and multiaim constraints, with the rigging package. I´ve been looking at the humanoid option and I have tested it in different ways, but I still dont get to understand, a few things in this context, I know the advatages of it using Avatar masks for example and some others, but doesnt seem to work the same way in terms of movement. Is it the avatar explicitly made for root motion or it has nothing to do with it? I´m getting messed up with the root motion and this avatar, after watching a few tutorials I´m even more confused. Can anyone help in this? Thanks in advance.
Both generic and humanoid avatars can be used with or without root motion
But the setup is somewhat different I believe
Generic avatars can use transform masks in place of avatar masks, which work the same way but mask by transform path/name rather than limb
The benefit of Humanoids is basically just retargeting I think
IK too if you weren't already using animation rigging package
The thing is I use Ik for a generic and its fine, like with the rotation of the hips while moving and aiming or standing still. But say I want to use root motion thats basically where the animation moves the character rather than a transform that i apply to the movement and speed of it in a script. If I activate root motion doesnt seem to work as smooth taking i nto account that is all changed by the script
What is "changed by script"?
the way it would move right?
What does that mean exactly
like as a i said my generic is moved by transform and the speed set by the speed of the animator blend tree. Here you would not move it the same way
is it?
That doesn't tell me how exactly you're moving the transform but
The idea of root motion is that the animation controls the movement, in that workflow whenever you change the speed of the animations, the amount of movement changes as well
You would not need to move the character separately from a script
Sorry Im a bit thick at this time, I mean i usually import a character with its animations, set a blend tree, for locomotion but i still need to tweak trhough code its transform position times speed and the it would move otherwise it would move in place, like it would play the animation but not moving
oooh okay
With root motion the root motion would move the character
You would not need to move it manually on top of that
so basically i wouldnt need to tweak between the animation and the speed until it looked realistic
Right, if the animation clip was made for root motion, the correct movement would be included in it
There's the callback for when root motion is applied so you can script its behaviour as well
https://docs.unity3d.com/6000.0/Documentation/ScriptReference/MonoBehaviour.OnAnimatorMove.html
Though the docs are really vague around this part
uhm yes i see what you mean if i need root motion i would get the charachter actually moving animation and not the in place. But interesting that you said about transform masks because i was looking at all this just because of the avatar masks so i knew it needed to be humanoid
So there would not be really more advantages than retargeting .
But thanks for that clarification anyway
I've been making alot of aniamtions for a player character, and all the ones ive put into my animator controller have worked but theyre also all in place animations. if i make an animation that goes off its origin point, will it snap back to the origin point at the end of the animation or will it move with it in unity? (i tried looking it up and nothing exactly answered my question online)
It will snap back
ahh i see thank you, i will look up how to animate origin points
With moving animations there are two workflows
First is that the character is animated to run in place, and then your code in game engine moves the character forward (or in another direction) and plays the correct moving animation when doing so
Another workflow is "root motion", in which you animate your character to move along with its root bone (parent to all limb bones), then in engine you let the animator component interpret the root bone's keyframes as movement for the character object by itself
Root motion is a bit more complex, but it lets you author the speed and direction of the movement per-clip with perfect control
However, if your movement has predictable speed and direction, there's no benefit to using root motion
If that sounds unclear this is a quite good demonstration of how it work, though there probably are many others
So if I have a rig that I can't force to become humanoid, how would I go about retargeting it to a humanoid skin in Unity?
Very basic question but how can I alter an animation to change like the rotation of the arm?
Got the animation off mixamo
Howdy. Our game has a bunch of humanoid actors. We want to reuse assets to make some new enemies that float around as if they are limp puppets being held by the head. Anyone got any ideas on how we could do this?
I did some testing with Boing Bones, which looks pretty fun, but due to the skeleton hierarchy I can't really 'fix' the head 🤔
We currently don't have 3D physics enabled and there's a little reluctance from the programming team to turn it on.
Can you please open source
You could maybe try the All-In-One Springkit:
https://assetstore.unity.com/packages/tools/utilities/all-in-1-springs-toolkit-271579
It's a single line to just add force to the spring so it bounces in place like what you're doing in your example. You can see the example of the dummy being flopped around, though it's from the ground rather than the head, but I imagine you could reverse it?
But it may be similar to Boingkit in the end, not sure, so it may be hard to do without joints. Honestly, if you told me those were lifeless floating puppets, I'd have believed it. Maybe have them be "dragged" from the pelvis bone rather than the feet to really sell the illusion?
Any 2D animator here ? I need help with something
!ask
:thinking: Asking Questions
:mag: Search the internet for your question!
:book: Use the API Scripting Reference and User Manual and this troubleshooting site for commonly posted issues.
:wrench: Attempt to debug your issue.
:thought_balloon: Find an appropriate channel by reading the name and description in #🔎┃find-a-channel
:grey_question: And don't ask to ask, ask a full question illustrating with screenshots if needed.
-# For more posting guidelines, go to #854851968446365696
:thinking: Asking Questions
:mag: Search the internet for your question!
:book: Use the API Scripting Reference and User Manual and this troubleshooting site for commonly posted issues.
:wrench: Attempt to debug your issue.
:thought_balloon: Find an appropriate channel by reading the name and description in #🔎┃find-a-channel
:grey_question: And don't ask to ask, ask a full question illustrating with screenshots if needed.
-# For more posting guidelines, go to #854851968446365696
it'll be more productive to just ask your question here and let everyone see it, than expecting one (1) person to look into your issue
But it may be similar to Boingkit in the
Hey there pretty people, it is possible to rig models directly on unity?
Can you be more specific? 
Depends on what you need to rig.
I think i solved it, even if it wasnt the best solution. I moved my pivot to the bottom for all the sprites. Any idea why i had to do that?
You can duplicate the imported animation and edit that. To edit inside unity, you'd need to import as generic, though.
is it possible to use the animator to fully encapsulate an invuln timer? i want the animator to play this 20 frame loop for X seconds (Invuln time / 2), then play a faster version of the loop when it's getting halfway through the invuln time.
I set it up like this but the exit time seems to override motion time, or im misunderstanding this all.
i can probably use a longer clip that just repeats itself for up to like 8 seconds, and then use the cycle offset as an alternative approach... but i'd rather not if possible
Hey guys. I haven't been active in this server for a bit, but i need some help. It's actually driving me crazy because my posts on the forums isn't getting any views to get attention and the reddit advice i've been getting is of no help. I've even tried going to chat gpt and it didn't help. This is an issue with interpolation
I’m working on a short animated film in Unity using Timeline. I have a scene where the main character is kneeling and then stands up.
The problem is that everytime I move certain limbs on the character, the limb goes in different directions before landing where the keyframe is supposed be.
My interpolation is linear with the property set to quaternion. I've already tried Euler angles and euler angles quaternion, all yield a similar result. I’m actually lost as to what to do now. I really want to get this project done so I can work on other things, but this issue is actually driving me crazy and I really don’t know how to fix it.
Please help?
Humanoid character and animals, can I?
Unity has no built in tools for bone skinning 3d meshes(only sprites) but if you have a skinned model then unity has rigging tools for both humanoids and general rigs.
Hello, im doing player movement in lateupdate(And i cant avoid this), and have an IK setup, is there any way of moving OnAnimatorIk to lateUpdate somehow? as it doesnt work very well when my movement is in late.
Doing player movement in lateupdate is gonna cause LOTS of issues, frankly.
Im not sure what you mean, maybe I didnt ask correctly, let me redo: if I have a 3D skinned model, can I make the proccess of rigging it (create bones and weights, I guess) using Unity somehow?
Wdym? think its mandatory in our usecase
What type of issues would i experience? without going into too much detail our game is an online fps, Players move on boats which are moved solely by the dedicated server, I need to use lateupdate to get the accurate interpolated network position of my boats to keep players movement bound within these boats, my movement is also not physical, im using a custom kinimatic character controller.
You can, but unity has no built in tools for it so un mist cases using a proper tool would be better
Well, up to you really. Why does it need that, if you don't mind my asking?
It will be running entirely after the animator
I did hate work on blender, Im used to unity interface, I would prefer to work with third party tools in Unity instead other softwares
If i set the speed of an animation state to -1 to play it in reverse, will the event on the motion still trigger when the scrubber passes it?
setting the animation speed to -1 will still allow the events to trigger when the scrubber passes them, just in reverse order
okay so if I had a 10 frame animation with an event on frame 4, and played the animation in reverse it would still be on frame 4, but in relative terms frame 6.
Yeah
If I have a previously imported FBX from blender. it seems that the asset is locked. Is there a way to add a new animation imported from blender to that asset without importing a whole new FBX?
You can export just the animation and add it in unity using the @ naming convention
What is the @ naming convention?
thank you
Im not sure If I should post this here or in scripting. I'm trying to set this up such that in the animator, I have many states that flow sequentially if the player clicks within a time window of the previous attack. If the window is missed, it will transition to the idle state. then jump back into the first attack animation of the sequence. Im an trying to use the same bool parameter on each transition. But im having issues that it only plays the first in the sequence or I get stuck in an infinite loop. Obviously im messing up some logic, but I cant quite see it.
Making animations for my first game and although the player animations went well
For some reason the enemy animations just dont play
And it stays in the first frame
i checked the animator and all the conditions are being met
tried turning off transition to self and it did do the animation
but only once
and then it went back to being stuck on the last frame
Is there an easy way to take my own arm model and replace the arms in this animation? I've been manually making each bone in my arm model a child of the bones of the original arm model and then making the original arm model's mesh invisible but it takes a lot of work and isn't exactly ideal.
Is sprite system heavier than doing rigging?
I was in the wrong channel before vvv
Is there a better place for resources for smoother animations between my character states? All my animation fire correctly but it is really choppy. Maybe because they are just place holder animations from Mixamo but wondering if anyone has found some really good tutorials?
If I put the animator in the player the player can't move but if I make the player a child of another object and put the animator in there I can move but those red circles no longer follow my player.
Watch "AnimatedController - SampleScene - Windows, Mac, Linux - Unity 2022.3.26f1_ DX11 2025-03-10 14-16-18" on Streamable.
Are the red circles a child of your player?
The red circles are from the animation no? so its it the parent not in the player
if I put the animator in the player I cant really move properly
Oh you’re right I didn’t look closely enough. The animator should always be on the parent with your model being the child
I would place the animated character on a child gameobject under the player (with the movement) and disable Apply Root Motion
And your movement script is on the child so the red circles maintain their world transform while your model moves locally
You need the movement script on the parent
wdym? so the actual player model on a child gameobject under the player?
Yes
where would I put the animator? in the model or the parent of the model
Preferably the parent with your script as well
Otherwise your animations on the model will override any changes applied on your transform
Thank you guys its worked 😭👍
On the child, I would suggest
Then the animator will never have to fight over transform values with your player scripts
I always prefer that the animated visual representation of a character is below in hierarchy from the gameplay logic, so there can be no conflict and it's easy to make a modular swappable part for when you have many characters that might share their AI
Looks like the only difference from vid#2 is that there's no root motion
Root motion's point is to give the animator full control over its associated gameobject's position in the scene
will that be a problem down the line if I dont have root motion on?
No, it's only for when you want animation clips to control the movement of your character instead of scripts
Why does this happen when I try making an animation?
Because you're using a humanoid avatar, that's the default humanoid pose
Incidentally authoring Humanoid animations from the editor is not supported
Hey so I need a bit of help with a sprite animation I’m working on. It’s for an animated background. I created the sprite sheet and sliced it but when I make it into and animation the whole thing jitters slightly. I know that the broken isn’t the sprite sheet being misaligned because I can see the entire asset physically moving. I’ve tried deleting everything and restarting a few times but nothing seems to work. Any help of tips should be so appreciated!
How can I do swing the hand animation (to make an IK sword swing animation after it)?
it would be idle --> trigger --> swing the hand --> idle
My current knowledge in animation is this:
Hello! Currently trying to export an asset from Unity to Blender for 3D printing, could really do with some help 😬 It has an animation attached to it, and all the bones are coming out incorrectly shaped, sized and rotated. Couldn't quite figure it out in the Blender server so I hoped I might find help here.
Actually... I can get the animations to run in the scene, is there any way to effectively pause them and export that way? All I need is a static model if so
Hey, does anyone know if it's generally better practice to put the animator component on the parent or the child object? Or maybe it doesn't really matter? Thanks in advancceee
Why from unity to blender? Normally assets we use would and should be in a workable format outside of unity to begin with
I prefer always on child object, so that the visuals including animations of a character are an easily separable part of the hierarchy
That also allows the animator to control its own transform with no chance of it overriding the world position of the object itself
But there's no one right way about it
With root motion workflow the animator expects to be on the root gameobject so it can control its movement and does so by default, but you can also read and apply root motion from any animator to any object with script methods
Thanks mate appreciate the answer, just asked cuz I've seen annoying instances of parents overriding children animations and things like that
When does that situation occur?
Sounds a bit like a setup with nested animators, but maybe you mean something else
It's probably due to my janky setup tbf, I don't animate too much
Just wanted to know if one of the two methods was generally preferred or not
It may help you to think of the animator as doing nothing more than overriding component properties in its personal hierarchy
Just containing hierarchy name pointers to a component and values to override stored in the clips
If there's a conflict, it's because it's overriding a property that another script or animator is also trying to control
That's basically the only kind of external conflict it can cause
That's why I prefer and recommend to have it as a child, because then you have a hard threshold between gameobjects it can and cannot control
But if you need it to override a lot of values on components that can't aren't strictly visual and can't be on the visuals child object, then that is not the most convenient separation
Okay thanks mate, think I understand it better now
I think I just need to make sure I'm keeping the parent and child animations seperate
Thanks for the help
How can I make transform local? Trying to simetrically place hands
The transform values you see in the inspector are already local
Local = relative to its parent
You probably want to invert the other hand IK's X position and also one or two of its rotation axes
In order to make it mirrored
if I remove "-" on x it goes too far
Then one of its parents is not centered properly
oh the hand IK position is incorrect
Sry if this is more of a blender question but I'm having a lot of trouble exporting/importing this fbx correctly, and it seems like something that a unity user might know how to fix. All animation nla strips look fine in blender, but then I have two issues once it is in unity.
The character's head always gets offset from the correct position for some reason.
The bind pose does not appear in the list of clips or as a 'source take'. I always make characters' first clip to be the bind pose so they stand in the bind pose in the unity editor. So without this my character stands in an awkward position with a broken neck when it should be bind posing.
I have no idea what I did to break the export/import.
Pic 1 is how my model appears in unity editor. Ignore the error, it is just some editor UI error that has probably been patched but I haven't updated my editor for a while.
Pic 2 is how blender looks when I am prepared to export, including what is/isn't selected.
Pic 3 is my blender fbx export settings.
U should check ur rig in unity
What should I check for?
Rig is correctly imported or not
Oh yeah, looks like I accidentally unticked 'deform' on the head bone, so it didn't make it into unity. That seems to have fixed the head problem. However the bind pose animation is still missing, and more bizarrely, there is now a giant prototype texture cube lol.
I don't know about the pose but that cube will be exported with other assets in blender
I have no idea where the cube came from but I got it to go away by switching to 'export visible objects' instead of 'export active collection'. I have no idea why that fixed it because there was never a cube in my active collection.
Everything seems to be working now. The only fix that made sense was ticking 'deform' on the head bone. I have no idea why the other adjustments worked. So I guess I'll run into these problems again later lol.
shooting animation is collection of actions
that comprise of different bones connected to different parts like gun trigger and hand
in unity it is splitting all the animations instead of playing all at once
how do i fix it
any idea if the animation in this project is done procedurally or a mix of traditional animation and procedural animation? https://x.com/Der_Kevin/status/1268232370769080327
Hello, ParticleSystem not showing up in the Windows Build
When the coin reaches its peak, an FX (ParticleSystem) should be triggered. This is the case in Unity Editor (see video 1).
However, this is not the case in the Windows Build exe (video 2).
Why ? How to solve it ? thank you
Its ok it was the Particle System needed i enable Deep Texture in URP Asset Rendering
I did it but i hope that will not too affect performance particulary for mobile build
just bumping this again, if anyone could help i'd be so greatful!!
Your video doesn’t play for me on mobile discord app. May be same for others, reducing the chance of getting a reply
hi hello i have a problem
i've imported an animation from blender into unity however when i play the animation in unity on my character it collapses into a single point
has anyone had the same issue / knows how to fix this?
Suggest you share screenshots of the FBX Import Settings, including each of Model, Rig and Animation tabs
ignore the rig tab as i do have already an imported rig for the player character i'm just importing the animations
My knowledge is a little thin here. Don't you have to specify what rig is associated with the animations by at least selecting the existing avatar?
Whenever I've imported animations I've always either created avatar from the file or selected an existing avatar. But none?
as long as the bone nomenclature is Exaclty the same (wich it is in this case ) no
animations can work wihout avatars as long as the nomenclature is thesame
Ok, but why aren't you just selecting the existing avatar? What issue would that cause?
breaking the animations that work from that bundle of animations
I'm not understanding. If these animations are for Rig/Avatar ABC, which you've already imported, how would that break the animations? I'm not sure I understand
because these animations are for the character holding a weapon , that has a completely different armature
and putting in the avatar does not solve the issue
ok, I'll have to leave it to someone else because this makes no sense to me.
Best of luck though!
thank you nonetheless
I have a problem with animation-rigging
It insists on putting my stomach bone at an arbitrary point in the ground. Very strange.
Even just adding the rig components and nothing else causes this issue
(original)
How come you can't set rotation of an IK target in editor??? Every time I enter play mode, set it to the right position (parented to another game object so it's in local space), then I exit play mode, paste the transform values. When I enter play mode, it's in a different position with a completely different rotation every time
OK somethin really weird is going on
when I grab the Y axis for movement, it changes the Z numbers
it's impossible to set position and rotation, every time it's different from what I set in playmode
Guys when i animate a chest it only sees the bottom part of it being moved while i have both parts selected anyone knows why
Maybe scaling issues in the bones? Are all bones 1,1,1?
I've experienced inconsistent behaviour with Animation Rigging and rotating the target in the scene. Hit play, rotate the hand target, hit stop. Hit play again, try to do the exact same thing, target won't rotate.
Yeah seems about right
So the solution is to cry, I guess?
I don't know. Honestly, I've switched to Final IK. WAY more reliable and does exactly what I want
getting some weird spikes using the Recorder, exporting to FBX and anim give the same thing
using some mocap stuff going into unity (technical details omitted unless necessary)
I can manually edit each take but I'd rather not have to
If you know why this might be I'd appreciate it
They are not.
It didn't fix the issue
I FIXED IT
this might help you too @gaunt berry
be sure to check what space(and scaling) you are exporting from if you are exporting animations from blender into unity
animations now don't collapse to a point
if your animation is controlling you rood (aka the stomach i suppose in your case) it might be scaling it down to the point where it is on the ground
New unhinged issue that I have to figure out instead of making my game just dropped
It is the scaling this time
The bones folded in on themselves
But I can't find any object that change scale
It just folds
i had that issue too this is the fix
if you are doing animations from blender
if they are mixamo i dont know how to fix
Oh wow
Get this
Renaming my skeleton from "Andrew" to "Skeleton" was the fix
This was solved by chance. I would have been at it for hours
oh ahahah yeah
animations run off of namespaces
so if the names dont match the animations dont work
avatars are effectively assets that remap animations to specific bones / armature / rig structures
Transform 'Skeleton' not found in HumanDescription.```
What the fuck does it want from me?
I'm having issues with my animation being weird on my avatar yet in the inspector it shows the little dummy do the backflip just fine. Does anybody know what might be causing this?
Oh it was just that I didn't apply root motion ;) Easy fix
Is that supposed to be humanoid? Because those names don't match what it will be looking for. Edit: Actually, I guess the names don't matter it's really the hierarchy.
I guess the vertical motion in the clip is treated as root motion, trying to move the gameobject itself
As the gameobject cannot move outside of play mode, you would see the animation without vertical motion when previewing it
Well what fixed it for me is that I just apply root motion on the animator, but it seems to automatically toggle itself off :( So I have to do it on the actual anim file itself, but I can't (see image)
I managed to get the player walking with IK and stuff.
My problem with it is that the animation transition is kinda too slow. How can I make that to look better without being sharpy when the animation is looped?
Curious to see if anyone might know better here for a problem I'm encountering. I posted it in #⚛️┃physics already but it kind of is an #🏃┃animation issue (so it seems) as well.
I've been messing around with joints (specifically spring joints) in Unity to see what kind of accessories I can get bouncing around on my mesh.
Right now I just have a rigid body in my game object hierarchy that the head joint from the armature I made in Blender is connected to via a spring joint.
Everything works all well and good... when my animator is off, but when I turn it on it seems like the animations moving the mesh take precedence. I tried making an avatar mask (and even tried turning off everything in it) but that doesn't work. Oddly, even with all the parts selected to red on the avatar mask there is still some slight movement to the model as if it's still being animated somewhat...
Any ideas on what might be going on here or how I can get the behavior I want?
The only way I can seem to get around it right now is using position & other constraints to make the bone follow a dumby that's connected to another object with a joint........
This isn't ideal, but it works. If anyone has any other suggestions lmk please
Yes
How are you trying to create the avatar? From the FBX import? Rig > Avatar Definition > Create From This Model?
What's a standard amount of animation layers for a third person controller? I know it varies, but I just want a general number so I can tell if I'm headed in the right direction.
Sorry if this is a stupid or obvious question (or even the place for the quesiton), but because of how my sprite animations are set up a LOT have accumulated over time and it's really annoying to have to scroll through a big list just to get to the "Create New Clip" option. Does this specific button have a hotkey or some way I can access it quickly?
I've tried binding a key to Asset/Create/Animation but that comes with its own set of organizational headaches
Hello all when importing camera animations from blender I'm not noticing focal length of the camera is not being preserved is there a way to do that so it doesn't have to be done by hand?
Hello, any ideas how i can fix this?
built in unity animations stopped working completely
made animations with them, but now they no longer respond to anything
didn't click anything, didn't do anything
whenever I preview the animation, unity disabled my animator component, but still shows the (non-editable) animation
when I toggle on the animator, it instantly toggles off by itself
can no longer animate with the animation window
why is everything unity makes so trash?
Yeah
Can you show me your avatar configuration window?
Opsive’s Ultimate Character Controller has 8-10 I think
What do you mean by built-in?
I mean with the animation window
the stock
garbage
yea I restarted the editor
the window just doesn't work anymore
I can't edit the finger rotations at all. I can edit hand rotations, but they are affected with OK so they just get reset instantly
the one thing I'm supposed to be able to edit just doesn't move
I rotated the thumb a bit, it worked. Rotated it a little bit more, it worked. Rotated it a little bit more, it stopped working and now the fingers just don't respond
I am having a very tough time trying to get an imported animation to work, if someone experienced could help me in VC that would be greatly appreciated
yall i need some help when it comes to animating a horse, like, how can i apply it so i can have the horse lean towards where its turning, like a more smooth turning if you get what i mean? Im just not sure how i could do this
im not sure if im explaining myself
I made an animation on a bunch of objects, how would I copy that animation and apply it to a copy of those objects without it affecting the original set
with animation override controllers, can i not override it by animator animation name but only by clip name? if yes it's extremely stupid
What's the difference of animation and clip in this context?
Are you controlling the override component from a script or just the inspector
Do you mean copying one set of keyframes in one animation clip to use them elsewhere in the same animation clip, or to re-use the animation clip for a gameobject made of a different set of objects, or something else?
You could either do it as its own animation layer, which would rely on additive layering and blend trees to blend the leaning animation smoothly with other animations
Or with a script that tilts a parent transform of the whole animator
so basically the leaning make it a additive animation?
Yes
ight thanks!
Making it with a script might be generally simpler, since you need a script to calculate the tilt anyway as it's based on momentum and likely would not line up with the animator parameters of movement animations
that might be harder for me to achieve but ill try
So there might not be an advantage to doing that and also the additive layer setup and tilt animation clips on top of it, if you can get by just tilting it in a script
But one advantage you might get with a quadrupedal character is that your leaning animations can account for positions of both ends separately
yeah
A bipedal character might lean forward or backward just as well as sideways, but a quadruped's legs would easily float or sink
ill def give it a go, might ask my programmer friend for some friend with scripting
You'd then have a 2D vector parameters for the intended lean direction and magnitude, which would control a 2D blend tree of leaning animations (or leaning poses rather)
The leaning itself takes some clever scripting to calculate
The character may be in full turning animation, but the leaning amount depends on the velocity
i mean i thought i can name the animation in the animator "shoot" and the clip itself "weapon_auto_shoot" and just always replace the shoot animation with the new one, but i have to replace the actualy clip name which is stupid
I'm a bit confused
The "animation name" within the Animator is the name of the animator state
The state contains a reference to an animation clip asset
Animator override controller lets you replace every animation state's clip reference with another clip reference
The names don't actually matter for the functionality, I believe
Unless you're using a script that swaps the clips in an override controller by their name, or something similar
Animator can have states X, Y and Z which by default have animation clips A, B and C
Animator Override Controller lets you assign any new clips to X, Y and Z so they instead play clips E, F and G or H, I or J, or any combination thereof
yup i know, changing animation state clips with the override would be easier because you don't need the real clips name
well i play animations from the script by the state names, so it would have been great to override them too
whatever i found a workaround
Got these animations from Mixamo and I assume I'm going to have to tweak my animations a little bit? Since they have some odd deformations xD
Can I do those tweaks in Unity or do I need to export them into Blender?
And also, how come my animations apparently move my character despite me checking on Mixamo that I don't want the animation to move my character? 😮
Maybe you have root motion enabled
I turned force place on in Mixamo 😮
Could be an animation issue, but could be a weight painting issue too
Hello I'm studying how to handle 2D pixel animations in Unity and ran into a problem.
So for example I have created a new Animation Clip in Unity's Animator Tab and I've added around 4 frames (sprites) to the Clip.
The problem is the animation is playing too quickly (I guess there are only 4 frames but the sample rate is 60) so I need a way to slow it down.
Now I've found a few methods to achieve the goal, but I can't decide which one is the best. So please tell me which is the best method, which is bad, or are they just the same thing:
-
- Setting sample rate to 12 (I've seen some guides like this video suggesting 12 being the "standard" number https://youtu.be/hkaysu1Z-N8?si=hzRCqlW7Q27RgX-V&t=210 personally I thought this method was straight forward until I see some posts suggesting to not change the sample rate and also tbh changing the sample for each new animation clip I create now feels like it takes a lot of time)
-
- Dragging the keyframes further apart so they "take longer to animate?" (Personally I find this way kinda weird but maybe it's just me)
-
- Set animator.speed lower, for example 12/60 is 0.2 so just set animator.speed to 0.2 results in the same speed as setting sample rate to 12 (This method is great if I want to change animation speed during runtime using script I guess. Also this speed is from the animator so I don't need to do it for each single animation)
Generally it's simple to just drag the keyframes apart
Unity's animations don't deal with frames in the traditional sense, rather keyframed properties over time
The keyframes distance to each other is the time
Sample rate is the "maximum resolution" of the keyframes' positions in the timeline
So you mean this way is the best because it's simple?
I don't know if it's the best but it's how you're usually intended to determine animation frame length
It also lets you control the frame length precisely if needed
Techniques 1 and 3 might even work better but I would expect some unexpected quirks
Now "intended to determine animation frame length" is what is convincing me. To be honest I think if there's no other qualification to determine what is the better way, I guess I'll go with the intended way. Thank you for replying
Despite being intended, the animation editor itself is not all that intended for frame by frame animations
So if you know for a fact all of them need the same framerate, it might be simple to set a very low sample rate and/or a slow animator speed
So it's hard to say which is best
But I don't think you can slow down the speed in any animation preview playback, so you can only see the real speed during play mode which may make it hard to modify them
I see what you mean
Hmm then I guess that's why some people prefer changing the sample rate. Interesting.
What could be causing this issue? Root motion is enabled.. when I press shift on my character, it's as if my characters axis is shifted. Or the camera is shifted, which I doubt.
The animations are from Mixamo and I've enabled the in place thing too.
I'm trying to figure out how to do 2D animation. I'm trying to make a "Snake" model where the orange circle is repeated many times, but how do I do that with a rigged sprite without the orange circle appearing multiple times?
Not sure if this is the best place to ask this, but I was struggling a bit to figure this out.
On v2022.3.22f1 of Unity, if I were to try to animate something, and change the position of it. It will show the X,Y,Z keyframes in the Animation window. If I were to remove the Y, and Z keys, so that only the X has a keyframe animation, I noticed that there's suddenly something that shows: "(Default Value)"
But there's no way to remove the property entirely. Is this something with older versions of Unity or is there no way to get the Scene's position information for those keyframes using Write Defaults off or something?
If I were to click "Remove Properties" it removes All the properties for position information
I tried to search this up online and got a bit confused.
Please ping me if anyone has some info on this.
I was trying to do an Rat Dance animation so downloaded a animation from this video.
But it doesn't work at all, it's my first step to the 3d world so I don't really know what's the problem could someone help?
(The file is the animation from the video)
This Week's Free Animation: Rat Dance
📂 Download Here: https://drive.google.com/drive/folders/1bJS0z09gqelvEppWDRslKha8FOXzge_0?usp=sharing
Checkout Dan's Work:
https://www.youtube.com/@danjara3d
✅ Formats: FBX
✅ Compatible With: Unreal Engine, Unity, Blender, Cascadeur
✅ Use for: Games, YouTube videos, memes, animations
📥 Download now and br...
Hey. Where can I get 4-legged character model animations? Specifically, horse.
Ping me pls when answer.
@dark anchor https://sketchfab.com/search?q=horse&type=models
Use Sketchfab to publish, share and embed interactive 3D files. Discover and download thousands of 3D models from games, cultural heritage, architecture, design and more.
Do I have to download the model too or just the animation and rig?
Eh, whatever. None of it is what I'm looking for. Thanks, though.
How do I add a short delay in x number of seconds before an animtation loops? I have an aniamted beating heart and i want to add a delay before the animation loops but i cannot for the life of me figure out how to do it
I expected it to be simple but evidently it is not
If you understand transitions and exit time you can make it not looping and automatically have it transition into itself on a delay
Or have an empty state it transitions to and from automatically with exit time, which may be more intuitive
ahhh thank you
For clarity transitions can define a delay for when the transition occurs after its condition is fulfilled
If it has no conditions but does have Has Exit Time, then it occurs automatically
I juist have an infuriating bug where I just can't set the rotation of an IK target
I parented it to a flashlighht and I want to make it fit the grip on the flashlight, but rotating is in the editor doesn't show anything
so I rotate it how I want in playmode, copy the transform values, paste in editor
once I exit and hit play again, the rotation is completely wrong
I managed to set it via code once and it worked but somehow it doesn't work anymore
I tried setting it at start and invoking after 2 seconds and nothing works
Like, if I press play, set Z rotation to 100 degrees, it rotates correctly as per the axis orientations
I exit playmode, set the same Z to 100 and press play again, the rotation is completely wrong
how is that even possible?
Logically something has to be overriding its position
IK components themselves are the main suspect of course, though I'm not sure how you'd go about tracking down something like it
I mean it works when I place hands on a wall, it's all great. It just doesn't work for the flashlight but I can't see anything I've additionally made to control the rotation
furthermore
I try to set local rotation in code, right? I manually type in values but the values it turns to are completely different than the ones I wrote in
this left me baffled
I'm working on trying to figure out if it could be gimbal lock and just now found out that you can copy quaternion values of a rotation in the inspector
which is neat, didn't know
I guess it could also be related to how the inspector and transform class methods treat transform inheritance in different ways in some situations
I mean, how else am I supposed to handle it? Need tk fibd an offset then set rotation every frame?
People use this for guns so surely they also child the ik target to the guns
It would be happening to them too
If you don't have something overriding the transform that you are also trying to modify, then it should work for sure
Ok it was gimbal lock
It works after I set the positios how I want them in playmode and copying the quaternion values, rather than eulers
I had to rotate each axis a number of times, one after another, which made me suspect this
I asked this question earlier, just wanted to give it a quick bump incase anyone knew anything. Please ping me and let me know~
Even if they appear as three separate properties, position is one vector variable so the animator treats it as one when overriding
By "get the scene's position information using Write Defaults off" do you mean you want the Y and Z to keep their zero values?
From the first part I assumed you specifically do not want that
Precisely, I don't want that, in this case. I was trying to get a fundamental understanding of how Write Defaults worked.
I was trying to figure out if Write Defaults was primarily for when you want to overwrite an animation's properties with another animation, or if it also worked with properties applied only in the scene
That makes a lot of sense though from what you've explained
I think I'm a bit confused at how Write Defaults works exactly, though.
I understand that it being off means other animations can overwrite properties that aren't specified in the animation. But does that mean that the animation with Write Defaults On uses all the property information from the scene, or is it hidden in the data of the animation when it's created or something?
So if I make a keyframe for let's say Position, but not one for Rotation. Then I assume Write Defaults On means that it will use the rotation information that it already had.
And Write Defaults Off means that it will allow other animations to overwrite it, if another animation happens to keyframe Rotation.
Is this understanding of it correct, or am I a bit off here?
@agile solstice I appreciate your time. If you have any further information on the topic, please ping me again.
I only generally know how Write Defaults works since I never had to use it
At most basic level I believe the animator overwrites every property it has ever touched with Write Defaults on, even if it's at zero
With the setting off, it should only overwrite properties that are being changed right now
I would guess that includes all components of vectors anyway, since a vector is just one property despite appearing as three
But whether it makes the keyframed motion apply additively to the value they had, or if it allows control to external actors for those properties I really don't know
It's something I've been wondering also
But never had a compelling situation to use it so I never got around to figuring it out
Unfortunately, since some of the games I make include VRChat games and avatars, Write Defaults is something that would be helpful to properly understand in some situations.
This is also my first time diving deeply into Unity animations, as I typically had team members that would handle animation more directly, so I'm trying my best to understand the options I have to be able to create well-rounded animations.
Thanks for letting me know, I appreciate it.
I'll experiment and see if I can figure out more.
now lets say i want to make a spider and use procedural animations with it, i Do not need IK bones for this right? i can just have regular bones right? i'm having trouble finding a good tutorial for blender rigging for procedural animations in Unity
How would one make their own OnStateFixedUpdate/OnStateLateUpdate functions for StateMachineBehavior? If such a thing is even possible
Hey everyone,So I am trying to retarget animation from maya to unity's humanoid rig character.I have also tried blender game ready rigs and tried to export animations to unity humanoid rig character and everything things works fine but hands are little bit apart from each other of the unity's humanoid character. Everything is green in configuration panel too. Is there anything I need to do or am I missing something?
I need some guidance. I have a rig from maya and the joint axis is mirrored. This makes is super easy to mirror animations in maya.
The issue I am facing is, Any store bought animations or sourced from the internet look terrible, they are not retargeting correctly and overall having a bad time. The Rigs I have tried are : Default UE5 mannequin, HumanIK from maya and a auto rigging tool called ZooTools Hive auto rigger.
Every single one of those rigs in may have flipped axis on the arm and leg.
Now, Is this the reason for unity not being able to retarget animations correctly ? Image for reference on the joint axis orientation
overall just having a bad time geting basic aniamtions to play nice with my rig and if I need to change the rig in any way to support bought assets , then so be it.
Hello, I'm having having a problem with a transition between idle, walk to jump animation, the jump animation starts a bit delayed after jumping, any guesses or help?
Because the jumping animation includes almost a second of the character winding up, first crouching before pouncing up, while your code applies the momentum instantly
Transition Offset can be used to start the destination animation later, skipping the wind up stage
oh yeah it worked putted some milisec offset
attempting to create sprite animation, and anytime I put an animation in its invisible, has to be scaled up, and even when scaled up, is obscured behind everything else despite having a dedicated layer with higher priority. even with the background removed, the animation is still invisible while the game runs.
I've been trying to fix this for weeks
You are trying to put sprites on a canvas
Canvases are specifically for UI elements and images, no other components should be parented to them
Canvases use their own internal sorting based on hierarchy, sprites use 2D sorting
Sprites are not "images", nor UI
The only thing they share is the texture import type
so whats the fix for this? what do I add?
You remove sprite gameobjects from your canvas hierarchy
Then you specify your canvas to render at a certain depth so it's behind other gameobjects
do they have their own hierarchy or denomination
No, they can be anywhere
Canvas and UI are particular about that
I'm pretty sure I put the canvas on a sorting layer behind the sprite... i'll go check
A screenspace overlay canvas iirc renders on top of eveverything
Screenspace camera canvas you can specify the depth of
ok so now its not a child of the canvas, and on a sorting layer above it
still not there
where do I find the depth setting
changing the camera depth doesnt do anything it seems
@agile solstice
Wondering if anyone can help, im trying to understand the animation workflow, my game is an FPS game my arm rigs are seperate from my weapon rig in both unity and blender, Ive made animations for reloading a weapon, i have an action on my AssaultRifle and an action on my arms im planning on playing these both simultaneously, ive exported the entire file into an fbx and im trying to use the animations, Anims for the arms seem to work file but the gun anim doesnt seem to work at all, What am i missing? hopefully the video below shows the issue. It seems to be some kind of exporting issue, the animation is 100% being played in unity but does nothing but the arm anims are fine.
If it relies on constraints like Track To, that's not supported in game engines like Unity and Unreal I believe. So you would need to bake those in the animation.
But I don't know for sure. My understanding is Blender constraints don't translate outside of Blender.
The animation is baked so i dont think this is the problem, This is the AK animation without any constraints
Mag is still removed from the gun
I wish I knew more, but I don't. Haven't done much in the way of imported, non-humanoid animation so far.
Whats stranger is that i do seem to get a working animation when exporting each rig& Actions seperately for(Gun only) this then seems to break the arms. This might be a non issue anyway as i can export all for arms, Get working anims for arms, Then export Gun separately and use the gun anims
I have another question, maybe someone can help me with, How can i remove this offset for this animation. Im manually setting the gun position to my hand in unity, Playing this animation pushes my weapon up & right, because of the transforms in blender. Ive got another vid to display issue
has anyone found a useful lip syncing tool for Unity? salsa results aren't great, and don't find much competitors
Anyone got any tutorial recommendations for retargeting ? I got a custom rigged model, and im wondering how to use it with Mixamo
Im using the blender mixamo addon but without luck
is there any way to copy motion form one blendtree to another ? I am working with large blend trees and I need to rebuild the blend trees each time I need to add a new tree toward the beginning of the blend tree
esiecially a blend tree blending a blend tree that is blending many blend trees XD
I've been trying to combine animations of a character running and shooting with... some QUESTIONABLE RESULTS. Trying out animation layers, override and additive modes Ive run into a problem:
I can mask the lower half of the body in the shooting animation and play it as the character either runs or idles, but... well, just as you see on the gif from a video-tutorial I was referencing - when you mask hip bones in the animation layer - the small movements of this bone during run/walk affects the upper animation of aiming in such a way that it looks janky and wrong.
I presume there has to be a solution that... makes the upper layer animations unaffected by the lower layer, at least to a degree, so that rotations of the hip bones (lower layer) will not affect the direction of the spine, chest bones (upper layer). I don't know how else describe it. It seems that th upper animation is overlayed in LOCAL mode (rotations of spine and chest are added on top of the hips rotations) whereas to look good it needs to work in something closer to a GLOBAL mode.
I can see a lot of problems with that, but because I don't really know how a situation like this is handled - Ive no idea which approach would be the right one to solve this problem. Has anyone run into a task like this? I presume this should be a rather common problem that any 3rd person shooter has to solve.
ahhh fellow bretherin of the animation struggles
While I can't give you to much info as I am trying to figure it out myself, what I can say is that you need to have the same aniamtion in both the upper and lower body layers. Both layers requrie a mask. Both layerrs need to be set to override .
your lower body will then not affect your upper body
but if that waddle is baked into the aniamtion , then you will not be getting rid of the upper body waddle
I feared as much. Thank you for confirming this. I suppose I'll either have to make a set of running animations where the spine doesnt move just for shooting... maybe then switch between regular running and shooting running...
Then again maybe some scripting solution will work... Oh well, the struggle continues.
OR
You could just take that animation into blender , user an animation laayer and flatten the transform of the aim from the first spine up
save and off you go
OR
Blend walking lower body with a idle upper body
tried sending a gif hahah
mm, mm, to straighten the spine, right
I've went back to Max Payne 2 to see how it does the animation, it seems that the entire upper body is frozen in place while the lower half is running as usual. I presume that looks silly in the hip-stomach area as well, but Payne wears a jacket that hides that stuff from the back.
Crafty bastards these rockstar
@limpid snow yup also
You can have an additive layer for breathing , hit damage etc.
Ik layer for just ik pass
That way you get the uncharted/TLOU 3rd person controller
Oh and basically upper body will handle aim offsets and that stuff
The way I see it .
Base layer = full body animations like holding weapons, crouching , prone , jump etc.
Layer 1 Upper: ADS, aimoffsets
Layer 2: lower body: locomotion in all direction
Layer 3: additive for reactions , breathing, etc
Layer4:IK pass for getting weapons I'm the hand right
Please take this with a pinch of salt as I'm trying to find my way on the EXACT same issue
mhm mhm, I see I see, you're working on something 3rd-personie with an over-the-shoulder view, I presume?
Im doing an over-the-head diablo-like with shooting so I hoped to get away with less hassle. Seems like I'll need to get involved in SOME hassle.
Come to think of it, the easiest way would be to make the shooting animation limited to only a hand-shoulder movement...
Something closer to this shooting guy from Darksiders Genesis
Either way thr concept should apply
why does my animation rigs throw error in unity 6000.0.42f1 ?
it used to work with a prefab from unity starter assets package (the movement, input, animations and character was in the prefab but the rigs were created by me and they worked perfectly).
Now the same rig (copy-pasted from the old character) that contains 2 childs (both are two-bone constraints) doesn't work anymore. Both of the childs have a target and a hint, my player gameobject has an animator component along with a rig builder pointing to "Character Rigs". This is the structure of my project
I forgot to mention the error is
System.InvalidOperationException: The PropertyStreamHandle cannot be resolved.
How do you know it’s related to the rig? There’s nothing in the error about that.
I fixed the issue, apparently I had to move the hips outside of the skeleton game object so that the rig and the hips have the same parent
or alternatively I could also move the rig into the skeleton
I really need a pro's help.
The video I sent is my charcter aiming and walking . The upper body has a static aim ready animation but notice how the entire body is still affected even with the avatar mask weight set to 1
what I am looking for is this :
Notice the uper body Does not move . Sure there might be a Teeeeny tiny movement but for the most part there is zero movmeent
The layer setup :
And finally the upper body avatar mask :
am I missing anything ? I am pretty sure I am
oh and the upper body idle animation I am 'Attempting to use ' for the upper body :
sooo to my mind I should have legs running around like a mad man and my upper body should be as cool and calm as a cucumber
I don't think masking is capable of stabilizing any bone that's above a moving bone in the hierarchy
Because transform positions and rotations are still inherited just as they were, only now an animation is filtered out from affecting the upper limbs
But I thought the whole point of masking was to have NO animations appblied to the masked areas?
confusion ... would I then need to have special locomotion animation made that does not affect rotaiton or transform ?
When no animation is applied, the bones still act like normal transforms when it comes to inheriting position, rotation and scale
If that didn't happen, the bones would freeze into an arbitrary position and orientation in space, and their parent bones would stretch away from them as they move
That stretching also would happen if you used an IK constraint to forcibly stabilize the bones
So, a better option is to have a more stable set of locomotion animations, yes
Which is most likely what's being used in your example as well
Thanks for coming to the rescue as always !
Just a howdy to tell you thanks a bunch for your help. I managed to fix the issue by using as super simple script to lock the pelvis rotation :
Good idea! Rotational stretching is much less noticeable than positional
Especially if you spread it over multiple bones of the spine
Technique you can see in practice here
It can't fix the positional bobbing though ofc
Yup. Even though you won't be seeing the legs, they still look really good. This way I can still use store bought assets
Ah ya, I can fix the postion bobbing but then it looks like my dude floats.. A little movement is a good thing
It keeps the visual of actually stepping about
how to fix that
How to export from blender or maya while keeping the original root bone?
hey is there a way to control the speed of an animation aside from making the sample rate different from the amount of frames in the animation?
not sure if that makes sense
just a simple rotation animation for a UI Image. i just realized i dont know if this is even the way to do it. i can either bring the sample rate way down or increase the frames, or both, if i want to slow down the animation but part of me feels like this isnt right
i guess i could just code it but figured id ask
maybe this speed field here
Yes, Speed is per state in the animator
If you want to change the speed of the clip at the source, you'd generally just stretch the frames out (or squish them closer together) from the blue vertical bars that appear when you select many keyframes
ok but what will be smoother/better? yea i can draw out the frames but should i be using this speed field instead? sorry im not sure if thats what you mean
@agile solstice
Smoothness is unaffected, neither is better
I would generally not change sample rate because it's not really meant for that purpose
But if you find issues with the other two, it might not be a bad option
i just figured that say, if i have a 60 frame animation and set the sample to 30 that it would just not even use half the frames
ohhh dont touch sample rate?
of course now my animation wont play at all when the game runs and i bring up the menu it exists on.....
The sample rate is the "maximum resolution" of your keyframes over time, speed is a side effect
It looks like you have a three frame animation, not 60
Unity's animation doesn't really operate on frames, but keyframes over an arbitrary time
true.... it slowly rotates though so while there are only 3 keyframes....
ok... yea see i just dont know what im talking about
Three keyframes are interpolated into infinite frames at runtime
Because the animator is based on time, not frames
ok i think i understand a little better
thank you!
So basically the "framerate" is the same regardless of where the keyframes are, or what the sample rate is
The animator only cares "when" the keyframes are, and interpolates any arbitrary value in between accordingly based on time
Sample rate determines how accurately it's possible to place the keyframes into the timeline
ok so im just gonna start leaving sample at 60 and using as many frames as i need. sounds like youre saying the animation will be as smooth as the game's frame rate allows
That's right
awesome. im so confused right now though. i have multiple UI animations, some of which have no trigger and just animate as soon as the panel pops up but this one wont play
ill figure it out thanks again
welp.... its a pause menu.. so the game is paused.... probably why they arent playing
If you are setting timescale to 0, then naturally time for the animator isn't running
Animators have a setting to run independently of timescale though
looking for that now
tried to code it but didnt seem to work
public Animator pauseMenuAnimator;
void Start()
{
menuPanel.SetActive(false);
pauseMenuAnimator.updateMode = AnimatorUpdateMode.UnscaledTime;
}
Why code rather than setting it via the inspector? It's just one dropdown
just cant find it
dear god
just found it
lol THANK YOU
helped a lot @agile solstice even thought the solution was so simple. ty
I'm having an issue with saving the certain rotation of the game object into a keyframe in the animation window
talking about this
Can you elaborate?
I'm new to this so I'm not even sure if I'm doing it correctly but I'm hitting the record button then I'm moving the point to half a second then I'm rotating the game object associated with this animation clip and the keyframe automatically gets added to the timeline then I hit stop record after that I hit play and nothing gets registered
Also I already added the clip to the controller
Hmm I know you can record animations like that but I never do it that way. Are you rotating the object in the animation window or in the inspector?
In the scene view
I’d click the little arrow next to right shoulder rotation in the animator window and adjust the rotation there. If that what you’re doing then try not hitting record. Just click the top of the time line to put the line where you want and then manually input the rotation
Yea I’m pretty sure you wanna be doing it in the animation window where I just said
I don’t understand what I’m supposed to be watching. Stop changing the rotation in the inspector or scene view and do it in the animation window
You need to open the property you are trying to animate
this?
Yea
It doesn't let me edit it directly from here idk why
…. Just type in the frame you want to set a rotation at or click on the top of the timeline
Then type in the rotation. No need for record button
I can change the rotation in the inspector and scene view only
No idea then
Damn
You can’t just type numbers into those property fields in the animation window? I don’t understand.
I wasn’t able to like it would just revert after i hit enter
I might create my own asset from scratch tomorrow and fri and hopefully i won’t run into that problem again
I feel this might have something with the read only feature or something like that
Maybe. Never tried to animate a model. Maybe there’s info where you downloaded it
ahhhh is there a better way to do this?
So i have a sprite sheet that plays vertically but animations read horizontally how can i fix this?
Sprite sheets don't "play" anything. When you're making an animation, you can drag the sprites in whatever order you want.
How do I move them around on my image do I have to do that manually and edit the image or can I just do that on unity?
I don't know what you mean?
like this guy on the internet had the same issue but on a different engine
it plays left to right instead of up to down
like i made a really scuffed version by rotating the image 90 degrees and then rotating my sprite in game but I feel like there is a better way
i figured it out it was auto seperating the frames and putting them in a bs order and i had to rename each one for it to work
You can't change the order it generates the sprites, but as I said, you have exact control which order the sprites are used in an animation.
If you want to reorganize the sprite sheet itself, you have to do that outside of Unity.
This looks neat fsr
What are… controllers?
I want to create vfx for my game mode, but will need to import my character model into unity to align the vfx with animations. In order to do so, I guess I need to set controllers?
Can anybody direct me to any documentation or tutorial that displays the workflow of how to integrade an existing state machine into your own character controller?
Yooo I want a animated button but the animator component does not work
I clicked on the "auto generate animation" and doesn't work either
does anyone knows how to solve this?
I also have the update mode in Normal
Idk if this helps but the animation isn't just scaling the button or moving it, its another sprite
I created the anim in Adobe Animate and but it in the game as a animation with a controller but for some reason the button does not animate
is there no way to have particles fade from glowing to not glowing?
Is there a way to "unclock" an animation so I can edit it?
Someone told me to duplicate the animation but it doesnt work. It seems I can't edit animation if it's imported from an fbx. I remember I did this animation in 2021.
I even tried to add a completely new animation and I can't click "add property" at all.
you need some object selected don't you?
oh so thats how it work, ok it work now thanks
is it possible to keyframe post processing values and save them as animation?
I don't see why not. You can add an animator to any object and animate the properties of it and its children.
At least with volume-profile based post processing. I forget how the old post processing works
I am using Sky and Fog Volume because its HDRP and it doesn't seem to be saving any changes to the post processing parameters while having keyframe recording mode active
Oh, not sure then.
One thing you can try is to make a middleman script component that exposes some parameters. Animate this component's values, and the component would change the actual volume parameters
good idea, will try that once I figure out how to reference them
Yea. Might need to pay attention to local/shared volume profiles too. Probably best to instantiate the volume profile at runtime to avoid changing the original one
that shouldn't be a bother, need that just to present some animations and VFX not to do actual game dev
Hey everyone, I'm trying to rotate a part of a character by directly rotating the transform of a bone using a script but it's not working. I've tried using layer masks to mask out the bone I want to rotate and that also didn't work :(
Even while the game is running I'm not able to change the bones rotation, but I can do it when editing
Guys I am trying to make it so a character reaches an object which it is working but the character I downloaded has animations like walking, running. How do I play these animations?
I am attaching the Blend Tree and the line of code I used to call the animation.
@finite rain you need to change the “Blend” property of the animator.
So basically
animator.setFloat(“Blend”,value);
Usually you make this “value” the speed of the player or something, but you can probably even click the animation states (the nodes on the right) and go to the inspector and select the animation file and you can make a whole new animation state if you want it to be its own thing.
Yhe ty, I figure it out 20 min ago after 3 hours 😤
👍 The Unity animator is a pain. Another great tip that I wish I knew when I started was the “CrossFade” method, which is basically like the “play” method but it interpolates the values in between animations so it doesn’t look so sudden between animations, but just use whatever works better for your project 🙂
Oh yhe I saw that on youtube as well. Thx
Y'all. I'm importing some 3D Blender animations into Unity, but some issues are occuring.
First, the animations are not visibly runnning (even when the animator is showing that it is). Second, when the animations are attached to the parts that had the animations in Blender, the motion is completely different (ex. when gun reloading, the objects doesn't move as intended).
To note, I followed guides on YT for 3D animations.
It'd be great if someone can tell me a fix. Thanks y'all.
why when i import my character into unity the coat and body start clipping?
it looks perfect in blender
its not really clipping
more like the hoodie is breaking apart
fix: add more skin weights
why the animation is offset and how can i put it right? also why in one sprite it has the white thing in the eye and the other not(im using the same sprite template for all the animations)
just found out about 3D animation layers...so, if i got right, unity interpolates between two extreme animations in real time automatically without needing to create in-between animations?
Is there anothe rplace where I should ask this?
Hey can anyone tell me how to save a pose to an animation?
im struggling with this atm as well! Would love a tutorial link somewhere! Im trying animation rigging and moving bones but it just scrunches up when i hit record
No matter what I do I can't record anything because the bones just snap back into place. I can't actually alter any of them.
so you guys know, there is an official Unity Ebook on Animation. It is free
https://unity.com/resources/definitive-guide-animation-unity-2022-lts-ebook
@brazen plume @short ibex
Hey, guys! I am not sure why but my animator doesn't work for a specific object that I have. What I do is actually activating the object and the animation should happen but it doesn't and I am not sure why. What do you think guys it could be for?
I see I have no coding issues for it
I have tested so many times the logic works as expected
Guys I need help fixing this, Could any of you tell me why the first second isn't working?
anyone got a clue as to why it's not playing the walking left strafe animation correctly even though the walking right strafe animation is set up the same way and it works fine? i'm super new to blend trees and unity animation
lol nvm got it, i forgot to check loop-time 🤦♂️
hi there, i'm using IK for the first time. followed along with this tutorial https://youtu.be/TUBHvQ2XEJs?t=73 i can move the target around and the hands follow correctly, but the entire body moves down when i play the scene
its unfamiliar territory so I dont really know what the cause could be
thats what the characters inspector looks like
oh, nevermind! the issue was that the Avatar shouldnt have been set. setting it to none fixes it
The engine lags when I use Animation. Specifically at the moment when i play an animation. At the same time, on hardware 100 times weaker than my PC - no problems (my laptop).
Lags - I mean that as if in the tab Scene and Game - have low fps.
Animation is 24 fps, but that's not the problem. On the laptop everything is ok.
I've been having a lot of issues with animation layers in Unity 3D.
I want my character's upper body to play an attack animation when the player left clicks, and I want the leg motion from a blend tree in the base layer. Right now, The legs simply don't move while the player is attacking. Afterwards, the player then correctly returns back to the locomotion blend tree.
related code: https://justpaste.it/gl1nv
does anyone have any idea what i'm doing wrong?
I've modified the heirachy of a game object and need to change the path on some animation properties. However, I can't double click to modify and F2 also won't let me modify them. Any thoughts?
Is there a way to get an animation that changes the color of a sprite to a target end color, but ignores what color it starts out at? So if I had the sprite color start out as blue and wanted it to turn green, it would interpolate the color from blue to green.
And if the color was black at the beginning, it would interpolate from that to green?
Yes, just disabling looping on it
As far as I can see your script is playing the attack animation on the base layer
I wonder why all this code for a state machine when the animator is already a state machine
You'll need a script to get/set SpriteRenderer.color
You can use Color.Lerp if you store the starting color, (or without storing the starting color you can do it recursively with the simple "wrong lerp" or maybe even more practically use Vector4.MoveTowards
MoveTowards might not consider color space, but if that seems to be a problem you can convert before and after manually
If you need that in an animation, you can have your clip animate properties of your script such as target color, or use animation events to call methods at specific times
I have a problem that I'm losing my mind over