#🏃┃animation
1 messages · Page 35 of 1
Make the animations in an external program or use Generic
Yeah generic is clean, I'm trying to avoid using animations because it's for a somewhat natural feeling first person view
So looking down should bend each bone of the spine, the neck, and even the eyes
Hello
Good morning
I'm get an issue with my animation
If I change the animation many times fast, the animation brokes and get a stance between the 2 animations
I don'y know this happens
Someone knows how to help me?
The issue happens when transition Animation C to B
How to set an animation frame to run for a number of frames in the animation window? Let's say I have 2 animation frames and I want first frame to run for 30 frames and then the second frame to run for 30 seconds.
Right now the animation ends at the second frame immediately and I can't expand the total length of the animation.
Do I have to duplicate the second frame and put it on the 60th frame to do this?
@wide citrus what software are you using for animations?
Just Unity editor
it's 2D sprites
No skeletal animations
Just static images
FREE animation package on my Patreon!
Hi! This video shows an easy way to animate your 2D platformer character. We'll animate their Idle, Running and Jumping animations! We'll use a blend tree to keep the controller super clean.
We'll also be using blend trees to create the cleanest animator controller for your project.
I start off with th...
Like here
But I have only 2 frames and I'd like each to run for 30 frames. I can put the "3rd" frame which is a duplicate of the second frame to fix it, but it feels hacky
thats basically how you need to do it
personally I work in 3D, and even there what you do is that you just duplicate the position of everything for multiple frames
I see, thanks. That'll do then. Just asking, so I don't start to do many things in a bad and hacky manner.
can you show us what you are trying to do exactly?
Unity animations measure length in time rather than "frames", but that probably has no effect on your result
maybe theres a better solution but you're asking the wrong question
it displays both I believe
oh nevermind
I mean it shows the length and fps so you can just calculate it
as an example this would be 50 frames for an animation
oh fuck you can do that yea
Animation frames in this case, which are sampled at a certain number of times per second
The user's application FPS will vary wildly in practice, but it has no effect on the length of the animation
Well this is what I'm trying to do. Now it's the idle animation, then there's like 25 of other animations that I will import and make work. Then I'll work on implementing inputs to change the state of the character.
I see Unity has the built-in support for the state machine, which is done with Animator component and Animator Controller, from what I understand:
I didn't get to this part yet and haven't found it in the docs
Haven't found working with animations in the unity learn paths
!learn
:teacher: Unity Learn ↗
Over 750 hours of free live and on-demand learning content for all levels of experience!
it's not as hard as it looks, once you get the hang of it you will be fine
yeah, most things are pretty simple in the animator
once you use it (no, not watch a tutorial and copy the settings, use it), you realize how straightforward everything is
there are still some weird stuff in it, but its not smth that cant be learned and worked around
(i will never learn how animation state priorities work)
Thanks, I'll ask questions as I have them.
at some point I even forget how my animations work but it just works
its very convenient if you learn how to make it easy to expand
does anyone have experience with animator in unity. I'm having trouble figuring out why my man is going into the ground when i run the new animation clip.
It's the default pose for a Humanoid character that has none or a Humanoid-incompatible animation playing
Is there a way to get it to not do this? A standing pose would be fine
Also in animator to make the animations, should I use the animator properties of each limb or the root of each limb?
Make the animations in an external program or make it a Generic rig
I don’t know if I can, since my professor heavily encouraged using key frames to make the animations clip. But do you have any good recommendations for external programs?
Why not make it a Generic rig then
Tbh I dunno. I’m pretty new to Unity Animations. If it can resolve the issue I’m having and create the animations clips/keyframes, then I’ll make generic rigs
Thank you, I'll check them out and go through them to get better with the animation system as I work on the game.
are those transitions good? (2D) if they are do i make em on bools or triggers cuz im so lost in the animator
everyone's workflow is different, so if doing the transitions in the animator works for you and gets the job done, its fine imo
i havent started the animations yet... im just tryna see how it exactly works cuz my first impression was its hard, weird and "laggy" and idrk how to work with it since im new to unity, but i want to work in it
if you're confused whether to have the condition between a bool or a trigger, just think about how you want to structure them
for example when transitioning between a grounded state and an airborne state you might have a bool that determines whether or not the character is on the ground
or have a trigger set off when the character leaves the ground and one when he touches it
Animator takes some trying to learn, but I recommend it over using the programmed transitions in code
Otherwise you might just end up coding in the same kind of state machine the Animator already is
the thing is id like to work and mix both but that prolly wont work, and also when i tried to do just running and stop with trigger it didnt rly work, but with bools i feel like theres a delay.
the delay would come from the transition not from it being a bool
you can set a transition time in the inspector when selecting it
Bools and triggers are the same thing, technically
Triggers are bools that get reset automatically the next frame (unless the related transition is stopped before finishing and they become stuck, requiring the ResetTrigger method, so overall they're basically worse bools)
well lets say the animation is 0.2 second long, when i send the bool it plays 3 times and on the fourth the actual character starts chaning, might that be an issue with the animation before still playing? how do i change that
what if theres 2 bools active at the same time
There's no issue with that
Transitions from a state will start when the Conditions are met, regardless what they are
probably does that because you're transitioning to it either from "any state" and you dont have "transition to self" disabled
so its constantly retransitioning to the same state
so 2 animations play at the same time or what
or does it choose which one it wants
only one state is active at once, transitions based on the conditions met
If you want good results with the Animator, avoid Any State when starting out since it's easy to get confused and tangled up with it
It's important to learn all about transitions and parameters, and then how to use animation layers and sub state machines for more powerful Animators
it was just a normal animation it was sum like entry->idle-> run and reverse, and the animation was playing with 1 second delay, and the second issue with triggers was at the start and the end it mixed the animations, so lets say when i stopped it played idle->first frame of move-> idle
whats wrong with any state?? i thought its just like when i want to play an animation no matter what like jumping, which can pretty much only be done when im running or idle, and i dont want to make a spider web that im lost in
how do i edit the way the mesh actually is? i want to make it look more like this, vertical white lines instead of the horizontal ones
The issue is twofold
It acts as an absolute highest level priority override to your state machine, interrupting it, so it can be hard to figure out during gameplay when they're the cause for strange transitions before you know how to look for them, and you may end up creating a lot of parameters and code to prevent them from taking effect too often which is unnecessary work
The other part is that they're tend to mislead you away from making logical state machines, since you could potentially use them in any situation before you know if it makes sense to do so or not
They're overzealous and teach bad habits, in other words
There are other ways to avoid spider webs, like layers and blend trees, and to some extent sub state machines
A good Animator state machine is all about strategy
You want it to be a system that automates as much of the animations as possible, so that parameters point more to intent than to individual states
what are blend trees? and i kinda have a different use for layers since my animations are divided to legs and arms so my attack animations dont mess with the overall moving
im so lost already 😭
If you have a parameter for every state, and transitions to and from every state, or all transitions out of Any State, then you're not really "using" the Animator and would be better off calling the states directly from code instead
Blend trees let you smoothly blend between multiple animations while synchronizing them
Such as smoothly going from idle to walk to run
Transitions won't let you do partial blending
Useful especially for movement that the player can control with analog input
Assuming this is the 2D skinning editor, is there not a geometry editing tool
yea; that only lets me drag the outer points though, unless im missing a button or feature that lets me connect any 2 points together
ohh so like when u have raising speed not like 0-5 but 0-1-2-3-4-5 and it blends the walking animation between idle and run??
Hello
I make an animation and I will repeat the same modification of component in almost every single scenes. But, when I applicate the animator in an other scene, I have the error that it doesn't found the good component, like in the picture. How can I change the component that I missing in each scenes ? Sorry if it's not very understanding, I'm not very good in english ^^'
is it possible to rig a pixel art sprite? as Single Sprite mode
How?
if you're talking about "bending" the sprite you can do that, though then it won't look right anymore as the pixels wont line up
could use a pixel perfect camera but it wont give you great results i dont think
I know rain world did it and it looks fine, but how?
it's not a HD sprite with pixel shader also
to make so some bone movements don't affect certain parts
I think we're on the same page
You can have motion that's anywhere between a walk and a run, for example
Hey, I'm using an animator and animator controller where I simply input what State to execute using Animator.Play(""), but it seems like after a white, my character starts getting offset , as if the animations were not properly, how can I fix this ?
-Nevermind, I needed to check the "Bake into pose" settings of my animations and now it works fine
please help. i have the animation tab open in unity. i have recording and keyframes added. when i try to change the rotation for arms and legs, the changes will never save but when i rotate the entire humanoid, the changes save. Why is this happening?
the first image is the result (arm rotation not saving) and the second image is the attempt (arm rotation)
the values for the rotation and position is grayed out while the animator values can be changed. why am I being gatekept from manipulating the arms?
Trying to import a maximo model/animation for class and having an issue for this one moddel/animation. Not sure why. It's a generic skeleton based on the import.
I have it setup like my other character.
The animator isn't even running.
I can manually hit play on the animation and it runs fine
but for some reason the dang state wont run lol
Im ijit
figured it out
Hey anyone who knows a little bit about 2D animation that could help me out with something?
I'm a 2d animator. What help might you need?
Did you make it a Generic rig
The editor will prevent you from animating Humanoid properties
Good day everybody! heaving a problem in unity 6, not sure if it is a problem with me, the rig or unity, got 3 different animations, mine, mixamo´s and another animator´s animation, all humanoid, using 2 different rigging systems, all have shown so far the same issue, wrist/hand bone and finger´s bones with weird rotations or orientation, looks like the hands are "constrained" or limited in movement, tried out the muscle system and it was not it, trying to figure out if it is my export settings for secondary bones or something, did a ton of test with different specs in fbx, so far nothing fixed the issue, re-set rotation or other parameters for the hand bones also did nothing, eating the guide "Animation in unity" from 2022 ( the definitive guide to animation in Unity), had similar issues before, but, I was able to fix them, this is different some how, anyone has any ideas on how to approach this? or a path to other guide? or similar issues? on the images we have the same animation in the same frame, the gray ones are in blender, working just fine, the other ones are in the engine and, in the FBX visualisation thingy:
somehow, looks like hierarchy in the bone structure was messing up the avatars in unity, problems fix 🥲
Please tell me how to do that lol 😂. I feel so stupid
you just swap the model type from humanoid to generic in import settings iirc
Guys, I have a few problems with my running and idle animation. Like when the player moves, the idle animation won't smoothly transition to the running animation. If anyone would help me I'm very much appreciated.
You are a goddamn genius
Hello everyone, Is someone available to have a call with me just to quickly help me with root motion? I'm really unsure with the assets that I bought and I'm fairly a beginner in Unity.
just ask here please
Okay, so in the assets I purchased, there's an FBX file named "AA_Basic_Basketball_Movement" that contains all the animations. However, in the Model FBX, when I checked the "Animation" settings in its FBX import settings, it says "No animation data available in this model."
This is confusing because I thought the model itself needed to have animation data to properly apply the animations (especially with root motion) to the model. Or am I misunderstanding something? Can anyone clarify how this works or if I might be missing a step?
have you checked the warnings that were apparently triggered by importing?
and checked this?
its this warning
Do I need to rename a transform?
OHHH How do I edit avatar hierarchy in Unity?
🤔 you sure? usually those aren't propagated to the console, in my experience
was the same message logged when you clicked the "Print to console" button?
https://discussions.unity.com/t/mecanim-discarding-inbetween-humanoid-transforms-and-rotation-animation/895786
seems like the rig wasn't intended to be used as humanoid?
why's run transitioning to exit?
not gonna lie, i have no idea
im super new to this lmao
sorry
fixed it tho
yeah
no, i meant i fixed the run -> exit transition
sorry i should have clarified
what's your run -> idle transition condition
well, that seems correct. have you tried checking this tab while playing (move it over the console or something so you can see both) and see if it's transitioning and playing correctly?
Then how do I fix this?
Cause I have a model from Mixamo. I was able to use the animation of it, but it is just not doing the root motion properly
you'd either have to fix the model as the warning mentions, or set it as generic instead of humanoid (as the forum mentions)
The issue is where the animation is not moving the transform of the object itself
it makes the transition when i press the "a" key or the "d" key, but it doesnt move. Also it's supposed to transition whenever i use WASD, not just A and D
the w/s not moving is because you never used them, you typo'd in the vector2 constructor
and heres a screen recording if it helps
by "doesn't move", do you mean the bar under the animation state? as in, it's not playing
no, i mean my player isnt moving
well the animation is playing so it's probably not set correctly then
make sure run has the right animation set
ah
alright i'll give it a look
so is that after setting it to generic, or...what exactly
you aren't really providing much info there
What does this mean? I've already set the fbxfile with the animations to Humanoid and Copy from other avatar, and this error pops up.
Nope, this after setting the Animations fbx's source to the Model avatar.
where at???
new Vector2(moveHorizontal, moveHorizontal)
ohhhhhhh ok
tysm i have no idea how i screwed that up
probably hit enter with autocomplete without checking or copied the wrong thing/didn't copy successfully
true true
alright we got that problem solved
now i just need to figure out movement
so have you checked that run was set to the right animation
yep
it is
can you show how run is set up
wdym?
like the animation itself?
or the tree?
the animation state, not the clip
the run state specifically
though actually it's playing so probably not that 
have you actually verified that the animation clip itself is correct?
atp i'm assuming it's a typo in the script but here you go
yeah
wait wtf
💀
alright up until this point i feel like i've done a pretty good job at understanding things but THIS is beyond me 😭🙏
i swear it was all good a second ago
ok
brb
got the animation working
brb ima try and figure out if theres any typos in my script
welp i legit cant figure this out for the life of me
I'm looking to have a tree with game objects running up from its trunk to its ends, all the objects need to spawn, travel (differenet paths for each one) arrive, ripen and be picked. Travelling is meant to be unique / varied but everything else would work the exact same way.
- I have used synced layers to swap the animation for each variant
- But now I'm not too sure how to first off activate these different layers and if it's at all possible to use this logic simultaneously for multiple objects that are running up different unique paths
- With or without sharing some of the travel sections, since for now each section is done as a whole but I hope to break it down into smaller chunks, and one branch can lead down to several forks
Any thoughts?
I'm looking to have a tree with game
I'm currently working on a game for my graduation project and I'm using machine state for it and I have to walk - walking - break walk animation, and I have a exit time on the break animation so it plays fully when the player stops moving, but the problem is, because of the exit time I'm dealing with this problem that doesn't let the player switch to animation needed, I tried to turn off the exit time but the break walk animation is not working at all. how can I fix it?
ive been trying to figure this out for the last 40 minutes and it looks so simple. what am i missing???
is it a bug or something?
fixed
working with 2D; I have an animator setup for 8D directional movement based on X/Y movement, and it all works. except for one thing; when I execute for the entity to start walking/running via code they'll activate the up walking/running animation for 1-5 seconds before actually starting to move properly and it looks really weird, this is the code I use to trigger it
// run from the player, triggered when the player gets too close
private void RunAwayFromPlayer()
{
Vector3 runToPosition;
// if the prey is not a bird, either run to the end of the map or a random nearby spot to disappear before being caught by the player
if (preyID < 6)
{
if (Random.value > 0.5f)
{
runToPosition = _playerStats.at.EntryPoint;
} else
{
runToPosition = _navmeshManager.GetRandomPointInScene(_playerStats.at.Name);
}
}
else
{
transform.parent.gameObject.layer = LayerMask.NameToLayer("UI");
agent.obstacleAvoidanceType = ObstacleAvoidanceType.NoObstacleAvoidance;
agent.enabled = false;
escaping = true;
_preyAnimator.SetBool("isWalking", false);
_preyAnimator.SetBool("isRunning", true);
_sortingGroup.sortingLayerName = "UI";
float randomChance = Random.value;
isFlyingWest = randomChance > 0.5f ? true : false;
speed = Random.Range(100,200);
return;
}
agent.SetDestination(runToPosition);
escaping = true;
agent.speed = 90;
agent.acceleration = 100;
agent.angularSpeed = 100;
_isPathFinding = true;
_preyAnimator.SetBool("isWalking", false);
_preyAnimator.SetBool("isRunning", true);
StartCoroutine(WaitForPathfinding());
}```
you can see this weird bug in this video
noticable at 0:23
ok so apparently the agent just takes a few seconds to calculate so my animals are just idling so i fixed it by waiting until a calculation before moving by using agent.pathpending, BUT still plays the up animation for like 0.1 second before really moving, which is weird
any idea why the middle 2 are higher numbers despite their next key frame being set to lower than the top and bottom parameter?
i assumed it would do it as a percentage (so they should always be lower) rather than whatever is happening
I'm not sure if this is right for the animation channel or even if it's realistically solvable but here goes
I have a system where my player grabs the wall to the right if he is near it, grabs left wall if near and grabs floor if neara
(ignore the jank, that's fixable)
I rotate the hand accordingly based on which raycast hits (ray to the right gives an opposite rotation from the ray to the left)
however, if you look at the last grab in the clip, it hits with the down raycast and therefore the hand is rotated downward
however, this is just a slope and realistically it should be rotated to the right (or ideally, diagonally)
I've been trying to compare and measure angles, this and that, but I haven't come up with a solution
is this realistically solvable?
Surface normal that you get from the raycast is plenty useful in this exact case
But then it might become an issue that the surface normal doesn't always make sense or tries to bend the arm in a way it cannot or should not
Good IK animation is all about anticipating and hammering out edge cases like these
hammering out in what way?
I actually didn't even think about that. It sounds very simple but I do expect I would run into issues
just probably less isues than now
Just more code and constraints that can react to unexpected situations
well that's specifically what I'm looking for here...although I might want to start with your surface normal solution
cause that is one
although maybe not cause I use tessellation displacement
that would probably cause all kinds of problems
Usually you end up needing many
Since there often are many unexcted situations
The kind of raycasting you're likely using cannot react to tessellation in any way
If surfaces to grab are expected to be very pointy, or have small holes that could cause the raycast to miss, sometimes multiple spread out raycasts are used
ok
so do you think I should direct my attention to surface normals then
or at least start there
That'd be my first idea
One option is to check for surface normal, and if it would bend the arm in a weird way such as when hitting at a very shallow angle, it may be better to fall back to the simple orientation instead
But there's almost limitless options how to go about it
IK can work like magic in uncomplicated situations, but end up requiring all kinds of checks and fallbacks if the environment can change unexpectedly
that sounds like a good solution
ok thanks, you've been helpful as always
Hello, I start working again on my FPS, and I tried to export some more animation, but I don't know why, but each time I export my animation from blender, my gun just completly broke, and I try like 15 time, and it broke each time. What's really strange is that I'm 100% sure that this bug never append to me before. Do you have any idea of what could cause such a problem ?
I'm not sure I understand triggers for this footplant/sharp turn animation. like why can it transition from any state but not transition back into default or somehing. how do i setup conditions to make go back to the other states
Hi, this has been driving me crazy for about a month. When the animator makes a transition from an animation that moves the legs forward or backward, the legs always automatically stay backwards at the time of the transition from idle, when the character is supposed to be just standing. As you can see in the video, when the character crouches, the legs go backwards on their own, and on top of that, when he makes the transition back to the normal position, he gets stuck crouching and the animator recognizes it as idle.
It works perfectly...in one direction 😄
not that I can't solve this technically, but what is the deal conceptually
What direction is that?
I mean it's either perfect, or it 180 opposite, in the direction of the player
Either the normal from the ray is coming out wrong for some reason, or the target is getting flipped after that
Even if you fix it at the source you usually end up needing some check to make sure the arm isn't facing or bending the wrong way
yea I will need to clamp angles
I understand that
if it helps
when it's perfect in one direction
I turn the player around 180 and it's now the hand is inverted by 180
i need help with this because i dont fin a solution in any place
Is it one issue or several? And is the video showing everything, I don't really understand what's happening in it
okay i will show and i think is a issue because its transition that didnt work
My stab in the dark is that perhaps some of your animations have write defaults on and some don't
what is write defaults?
Determines if an animation clip overrides all properties, even ones that are zero, or if unchecked retains them from a previous state
OK I solved my problem by first aligning the IK tip with the player, rotating so that the hand is facing down and only down aligning with normal direction
seems to be working
yep, seems to work every time an all raycast directions!
this is what im talking about psd:sorry for be late i had a few problems before posting this
That's how the legs went in the animation preview, so is it not intended?
yes
and its supossed that when you press c (button for crounching) again the character have to transition into idle but. the problem is that the character keeps crounched like the video shows
the same problem with legs happen with the character when is jumping
i tought that was character mask
but the animator dont use avatars or mask and dont use layer masks
Have you set some constraints in Blender for your gun armature that might not be supported in Unity?
We're not seeing the transitions, parameters or anything else that could be responsible for that so it's hard to say anyting
It doesn't really look like you're using animator transitions or parameters to begin with
i used code
but code dosent have the fault because code is using transitions
unity automatically make the transitions like that
its werid because
i check animations a lot of times and nothing see wrong
Hello
Is there a tip on using Crossfade on Root motion animations?
Is this the right settings for root motion crossfade?
can anyone help me about this its still related in animation myproblem:
#🤯┃augmented-reality message
yes I have a ChildOf constraint for the mag, and one for the handle/Pistol grip to attach the weapon to the hand. All of the other bones are just parented to the handle/Pistol grip, but whats really strange, is that all the bones are broken, even if I bake my animation and my constraint in blender, before exporting
Do I have to delet my constraint in blender, when I have bake my aniamtion and Constraint and when I want to export my animation ?
I don't think so. If the constraint isn't supported in Unity it won't be implemented.
they might not be imported, but maybe they are the reason of why all bone Transform are broken ?
what's really weird is that all the bone are baked with a keyframe on each frame so they don't need constraint anymore, so I really don't understand why the bones are acting like that in unity
Im not sure what it means exactly but is it normal that unity animations are by default 30 FPS? I mean animation packs, mixamo, etc.
I created an animation thats 60FPS and i wonder if that unneccessarily wastes performance
to be honest, Yes it an unneccessarly wastes of performance, if animation are at 30 FPS, it's because, it's the right speed to get anought detail while keep it light and easy to make/animate. 30FPS doesn't mean that your animation will always run at 30FPS even if your monitor show 60, 100 or even more FPS. Basically if you have a 30FPS animation but your game/screen render 60 FPS, each 2 frame Unity will interpolate the animation to make the animation smoother and make the animation match the number of FPS your game is running at.
has anyone used Blender 4.3? new Asset Pose Library and just exported a bunch of individual poses for a mesh and then made their own Animation Controller in Unity and used the individual pose assets as blends for layers?
I am trying, its working, but i noticed the pose in blender is 0 frames, so i had to tweak that, not sure if anyones done this before and maybe has a better workflow?
Good day guys! I got a problem, might be easy to fix but, still heaving issues, trying to "zero-out" a custom bone I added in the hand of my rig in the character, all that I have tried so far has not worked, in unity it still shows information for position, rotation and scale different then zero, this is a bone for items, like guns and cups, idle pose and animations the bone still shows values, not zero in any situation so far, I did the edit of this rig and animations in blender 4.2, what usually you guys do as a solution for "item Bones"
has anyone used procreate to make characters for unity?
When I select my MC parent , it says scripts not found so I can't edit it. I can only add bones if I select each parts separately but then it doesnt create any bones bc it's just 1 part???

Using the “Animation Rigging” package, is there an option to do stretching when also doing a twist relaxer? My end goal is to have stretchy arms for torso of VR avatar.
i think is a bug from unity
like this video show
sometimes in preview seems like normally will work
and later no
i get noticed that error happens when a character animation legs
rotation
is more bigger that 90 or -90
Is there a separate editor for 2D animations?
Right now I have to have a whole scene with a character in it
And then the icons get in front of the character
Like how am I cupposed to work with animations in this window
When there is a big lightning icon on top of the character whatever that is
How do I remove it?
They are called gizmos and can be disabled from this button, or from the arrow down reveal a slider that allows you to resize them
Hello everyone,
I have a custom animation that I've made for my player here where it just dribbles. So, I added an extra properties from the dribblling motion of the player. So the property was just an empty gameobject called "Dribble Hand Transform".
Now, when testing it in the editor it's working. But in-game, the properties are not moving 😦
I'm so confused now with how Unity Animations works
hello, i am trying to make a simple door open/close mechanic, everything is connected, animations and animator are all done and connected, but when i interact, the animation doesnt play
can anyone help>
Hi, Im relatively new to animations in unity and I've been following a tutorial to figure things out. I tried creating an animation by dragging a spliced sprite onto the scene, and it did create an animation. However, when i click on the animator controller, nothing shows up
Anyone having issues here?
hello, soo, how i can make animation like this, as i know it's imposible to do this with only unity animation and animator controller, do i need to make it as a gif?
Thank you, it worked yesterday. It was late.
guys where can i find the animator? I want to edit the frames for a sprite but idk where to look
like this window
nvm found it
Is it intended behavior that a playable director set to none wrap mode won’t “let go” of the object once the timeline finishes?
I have a timeline to change an object’s color. Once that’s done I want to update its color by code, but I cannot until I enable/disable the object.
The timeline looks fine without the code, and the code works perfectly without the timeline, so it must be the interaction of these two things that’s the problem.
It actually looks like a problem with the animator and not the playable director. Even when i completely remove the component disable the component it’s locked into whatever state it was on the last frame until i enable/disable the object. Is there any way to get around this?
Hi, guys. I want to correct my melee sword animation a little bit making it more sweeping. What constrain should I use?
Is there a way to find those deleted articles:
https://unity.com/blog/community/having-fun-with-the-new-mecanim-features
http://wiki.unity3d.com/index.php?title=Finite_State_Machine
They're linked on the forum but it's dead links and wayback machine website doesn't have it.
The second one available: http://web.archive.org/web/20210924044443/http://wiki.unity3d.com/index.php?title=Finite_State_Machine
Why does animation rigging feel the need to contort my character's arm in unimaginable ways the more it extends towards the target
Didn't really know what to share to help here so let me know if there's anything I can share
(Completely fine without a hint and when the arm is fully extended btw)
A video of what's happening in motion and how does the hint affect it
Probably doesn't exist anymore
What mecanim features is the first article purpoted to be showing?
I put way too much effort to make this zombie look decent, can someone help me with the animation of it?
Using the animator state machine for other purposes:
For sound and even UI states.
Here's one of the quotes on the forums that's supposed to be from the article:
StateMachines everywhere
A nice thing with StateMachineBehaviours is that you can use StateMachines without animations. So anything in your game that requires some kind of StateMachine-esque logic can use our nice visual editor live feedback.For example, a music StateMachine…
Seems like it would've been a useful resource
Here's one that might be about the same idea
https://medium.com/the-unity-developers-handbook/dont-re-invent-finite-state-machines-how-to-repurpose-unity-s-animator-7c6c421e5785
What zombie? What animation?
i have a 3d model with several clothing peices to choose from do i have to animate and rig each single variation of cloth and person or can i just animate the clth seperately and attach it to the player
Hi, what do you do for transitions when you have a lot of animations?
i mean, i have to set every transtion time delay to zero and turn off it exit time, when are a few animations its easy...but what i do when are a lot?
and also when i have a lot of bools, ;-;
When I make an animation that’s 4 key frames long that equal to one second
When I play it it plays then goes on for another 13 seconds
How do I trim it so it loops
why is add property greyed out for my animation
im trying to add a curve and nothing gives
Hello, I need some help here because Im at a dead end
I have an animation exported with this model that should allow the cube around the center to rotate continously, but it's saying that in order for the animation to play I first need to mark it as Legacy. The thing is, I can't mark it as Legacy because for some reason my debug window is greyed out?
Is there another way that I can go about getting this animation to play while my scene runs, or can someone point out what the issue may be?
All I am being told is that I need to "Mark it as Legacy"
How can you offset an animation? My animation is working butttt player legs are in wall lol
How do you put a fla fille into unity and make it work?
so if I have an IK chain where the tip is the hand, I still need to do more IK constraints for fingers, even if they are not affected by said IK chain?
do I then need 5 (10) more IK chains for each finger?
it's a pity you can't animate fingers as long as a parent bone is affected by IK constraints
This is a read-only animation. Notice the label here, and how all of the properties are grayed out.
Animations that are produced by an importer cannot be directly edited.
this one is coming from an FBX you imported. it'll be a sub-asset of the model asset
What are you trying to do here?
a flash player project file?
that sounds double-plus impossible
What are you using for IK here? Animation Rigging?
I don't know much about that package. I really need to learn it..
Yes
Is there a conventional way of keeping a LookAt IK (Multi-Aim Constraint) target stay in line with a character head upon entering a crouch/prone pose?
I thought i was setting up a curve to control the weight of the foot ik... for example 1 and you have complete movement towards the ground 0 and he returns to normal foot motion
i was able to duplicate it to where i could add properties and edit curves but it gets confusing after that
hey, quick question, in animation transitions, in that time line on the right, what are the units of the numbers bc i thought it would be seconds but the go: 0:10 - 0:20 - 1:00
Is there a way to subscribe to animation clip finished playing event in C#?
transitions are usually a part of a factor or percentage with exit time enabled .75 or 75 percent of the animation plays before blending the other animation in
Show us a screenshot of exactly what you're asking about
Hey, what's the best way to call an animation?
I been taught to use Booleans, but honestly, it made some glitches and its pretty unorganized and weird in my opinion, i wanted to use Ints for acomplish a more eficient way, each number for each states, like if i were plain calling them
But now im wondering, is there a way to plain call an animation?
or i just use the ints idea?
You can directly tell an animator controller to move into a given state.
This is useful if you just have a bunch of states and can reasonably transition between any of them
You're skipping most of the animator controller here, since you aren't using transitions
hi, i did it and it works! halfway...the states change and thats cool...but why the animation doesnt play?
i mean, its just frame 1
this is the code
You set a time offset of 2. It's going to try to start 200% through the target state's animation
If it has a looping motion, then that should still be ok
it not...
then what i should have to do?
wait, how do i set looping? it needs looping
Where is the animation clip from? If it's from an FBX, click on the model asset and set Loop Time
If it's an asset by itself (not part of a model asset), click on it and check Loop Time
its a sequence of sprites
Also i think i fix it but now i have another issue
the animations "overlaps" each other
i mean, when it runs, the animation is playing running and idle and walking all at once
how i can fix this?
{
transform.position = Vector2.MoveTowards(transform.position, objetivo.position, runSpeed * Time.deltaTime);
animator.Play("Base Layer.tuetue_run");
}
if (esDerecha == true && debePerseguir == false)
{
transform.position += Vector3.right * speed * Time.deltaTime;
transform.localScale = new Vector3(-1,1,1);
animator.Play("Base Layer.tuetue_walk");
}
if (esDerecha == false && debePerseguir == false)
{
transform.position += Vector3.left * speed * Time.deltaTime;
transform.localScale = new Vector3(1, 1, 1);
animator.Play("Base Layer.tuetue_walk");
}```
can someone help explain to me why my character starts off like this first screen shot and stays like that instead of the idle animation in the second screen shot?
its causing them to be stuck in the floor
what are you transitioning into?
you mentioned there was a transition involved in your post in #💻┃code-beginner
The first pose is the default pose of a humanoid avatar
that means that there is currently nothing controlling any of the humanoid bones
Going from idle into a sub machine that goes back to idle
It says that the transition is the same as screenshot 1 but I don’t know how to fix it
Pls can someone help me with how to make my a animation rigging without animation rigging package am using unity version 5
I mean procedural animation without any package
I mean you cpuld make one with code
Rotations and calculations and stuff
But why? Using animation rigging is just easier
What?
hi guys
hey, is there a way to "return" to an idle state somehow? I imported for templating a 2D controller with a charakter.
It has the animation "attack()". Additionally, it has 2 functions:
attack() and attackOff()
Both functions simply set a bool (Attacking true or false).
If I press space, I want the animation to only play once and then return to idle.
The only solution I found was to check how long the animation lasts, wait this time in ms and then set another state, but that doesn't seem smart
if you want the animator to move from one state to another, you need to add transitions between your states
hello, i want create a procedural animation, but, i've little probleme (i don't know how explain this)...
my bones are not good, and my rig don't function
your hierarchy doesn't look correct, I suggest naming your parts as foot/shin/leg/hip etc to make it clear what's what, then it might become apparent where your issue is
no, it's not apprent 😕
leg should be set up like this:
you have it like this
mmmh ok
kinda looks like you have two hierarchies here, disable the 'rig' one if you're just testing on boxes
looking a lot better
yes but how to do now ?
Do you have a rig and the ik component?
no
rig yes
These are the parts you need
here is the configuration of the ik setup
the target is just a transform called target
then select the target in play mode and move it around
the target is where you want the foot to be, the hint you can use later, just make sure the knee is bent a little the way you want it to go
the knee isn't way
look
you have the rig builder somewhere with your rig referenced, yes?
can you confirm the rig builder is set up?
it's good
(no resolve, but i just confirm)
When im animating in blender and have a number of shapes that i want to turn on and off and i want that to carry over to unity how do others do that?
I'd like to be able to animate values that make their way over to unity that i could have turn on and off bones/objects.
in blender i attach custom properties to the bones that i use to drive visibility just as something for me in blender but i'd like something like that to carry over into the engine
ayyy i got foot ik working... none of the 4 or so videos on youtube actually explained you have to setup a rig
ive never seen a rig disappear a model tho..
hey so i got a project file which converts 3d model/animtion into pixel art sprite sheet
here is the link:-https://www.youtube.com/watch?v=kALXAWSDYEo&t=5s
but i need to use legacy rig for this to work and when i convert my fbx into legacy rig it becomes invisble like shown in the images but is visible in any other rig mode
how can i fix this please?
most times it just sinks it into the ground
im not really an animation guy and deal mostly with static/ hard-surface modelling.. but lots of guys around here are.. just give it some time.. best of luck 🍀
thanks brother
i have been trying to find the reason/fix for this from around 18 hours and none of the server respond to the message 😄
yeah understandable its a really old feature from unity
nope i tested it the warnings exists for other rig type too but those work fine
if you can't find an answer here on the discord i would suggest typing out a well, explained question w/ ur examples and images and post to
https://discussions.unity.com/
double up ur chances of getting an answer
is that web even active? i never use it before
its very active.. its Unity's official forums
hmm yeah makes sense tbh
Im trying to record an animation clip, Seems to be working fine for shoulder, but when i try to change the child of shoulder, the shoulder moves back to original position
How do I use the animation window I hit record position it and then add keyframe and then type in 1 into the window that says 0 and then position it and hit keyframe then when I play it does nothing is my Unity broken?
Is there a way to open and work with animations and prefabs in their own scene?
Similar to how we double click on the text files in Visual Studio, they open in their own separate editor for that file. Or in Unreal Engine when I double click on an asset, it's opened into their own separate tab.
Usually in all the programs when we go on and edit an asset, they're opened in their own asset-editing scene.
For example, even in Unity when we edit Sprites in the Sprite Editor, it's a separate tab for that.
I want to see something like that for the Animation and editing Prefab assets.
Can I do that?
Double clicking a prefab will open it in it's own scene for editing but it shows in the scene view. If you want to see the prefab and the current scene you can do that by pressing the little > 'open prefab in context' button.
What are you trying to achieve?
Just a more fluid workflow. For example, to create and edit the animations in the Animation tab I have to:
- Open a scene.
- Put a character in it.
- Click on the character.
- Have an Animator component on the character.
- Have an Animator Controller class on the Animator component.
Only then it allows me to create and edit animations in the Animation tab and then I have to have that Animation tab in the same view as the Scene tab to adequately work with it.
If you have a character prefab already you can double click that character prefab and open them in the prefab editing scene, where you can make animations without having to create a temporary scene.
Thanks, that works.
Anyone know where to learn step by step how to do procedural animation? Like form the very start of making a model then adding the bones correctly so they work in unity with inverse kinematics and then setting up the code in unity. Everything I seem to find assumes I already have a correctly rigged character imported to Unity
so I set up some custom render passes to render my character over the terrain. He needs to grab the terrain and rotate and all that, so I wanted to make sure his fingers and hand don't clip through the terrain
but there are some issues with that setup
namely, the hands rendered after everything. If he is grabbing something a little bit behind a wall, the hand will be shown through the wall. Also, it's rendered after all other objects that I'm grabbing so I would need to dynamically turn the custom passes on and off
should I do something different? Is it worth it to raycast everything to mechanically make sure the hand isn't penetrating where it shouldn't be
but I'm concerned about the performance costs of all that
Please where can I find a tutorial on how to learn procedural animation without animation rigging package
i made animations in blender and imported them to unity but they started moving in unwanted axis how do i fix it??
it should slash and return back to original position everytime but it isnt and keeps going in circles
you should record an mp4 so that it embeds in discord
Hi guys, I had a question. Is there an easy way or a tool that can fix animations breaking when their hierarchy is moved?
why is unity's animation API just absolute garbage?
Can you elaborate a bit please?
hey guys
sometimes, my character will hold a weapon with both hands
do I have to recreate all animations for it to hold it with both hands?
or I can make something that only influences where the arms are
Oh man where to start.
No support really for animation start or finished callbacks.
You wanna do something after an animation is done? Gotta do a coroutine. How long does the coroutine run for?
Who f'n knows because to find how long an animation takes you have to dig waay tf into the Animator class and iterate every single animation to find by STRING NAME the f'ing animation--which could differ from the state it's in!
You could try adding an animation event but that only works with scripts that are children of the animator--which the solution for that is...don't use Animator at all! Use Timeline! How creative a solution Unity!!
Oh and you can't really do shit with the gameobject while the animator is controlling it, and animation events aren't even guaranteed to be hit if they're near the end of an animation.
Oh also the obvious animation memory leak which Unity has known about for YEARS and they have yet to patch it.
so I'm messed up?
No I'm just ranting.
You might be able to do some kinda IK system to target where the hands will go
oh
like a new ik system inside of unity
okay, sounds good to me and something that should work, do you have any good video about it?
In this tutorial, I show you how to attach a weapon to your character, using Unitys Animation Rigging package and the two bone IK constraint with no coding.
►Next Video: https://youtu.be/ajmp3J7N3Ow
►Previous Video: https://youtu.be/_I8HsTfKep8
Assets and packages used in this video:
► Synty POLYGON - Starter Pack: https://assetstore.unity.co...
lovely! thanks a bunch
hmm okay, I'll watch the whole video
so far I'm kinda confused with
how I will make different animations for multiple weapons and how to make them work
fe~ a Katana, a short sword and a giant one, I want them to have different attack animations
Instead of having every single armor constantly stored as a deactivated object under character mesh, Can i remove it, and add it on equip?
I tried doing it, But after adding the item, It wasnt "connected" to the animation/rig
For example:
- I removed a skirt
- player equips skirt.
- Skirt spawns parented to player
- I select hips root bone in skinnedmeshrenderer
- Skirt still doesnt move like it originally would. Its not attached to the rig/animation.
Any way i can do this?
that is kinda complex but
can't really help you much, but model stitching is the way
... man... xDDDDDDDDD
My animation window is reporting that the entire hierachy is invalid, like this, while clicking those """missing bones""" selects the correct bone in the hierarchy window.
The animations no longer play, and github isn't telling me that I've modified the character model, the animator, the avatar or even anything on this prefab.
This is in Unity 6000.0.24f1
The animations in the animation source file ALSO no longer play on the character's model.
Since it worked, I have imported a couple of unrelated models, and made some changes to scripts.
Has anyone come across this before?
I understand this might either be a beginner question and therefore might not need help, or that this ISNT a beginner question, and therefore might be ignored, but its kind of halted development and is kind of urgent
okay so, it only happens when there's an animator present in the hierarchy
or, it happens when there's another animator present in the prefab at all
or not?
Okay, figured it out
Two animators existing in the same prefab causes them to not work
It should fix itself once i've figued out my loadout stuff
Why is this child object (the gun) moving so much more than the parent (small sphere)? It's not being animated, just the sphere is
i have this one little problem for some reason my animation does not transfer to what it should when the condition is met in unity if someon can help me fix ?
There is a bomb attached to my character's left hand, but I want this bomb to be attached to both hands of the character. When it is attached to a single hand, it can cause problems in character movements and animations. How can I solve this problem?
hello chat
I'm using two bone constraint
but my elbow isn't working properly, it goes through my character
I thought "hint" would do the work
that little cube, is the hint "ElbowIKTarget_L"
the elbowtarget reference is positioned properly, however how do I apply that weight to my rig for it to bend right
If you want to react to an animation state entering or exiting, use a StateMachineBehaviour
The animator does not play animation clips. It plays animation states.
An animation state contains a Motion, which could be an animation clip, or could be an entire blend tree.
Any ideas why as to my player stops being able to move etc while the PlayerDeath is in the controller?
even if there are no transitions player doesnt work with the PlayerDeath in it
So the animation just freezes when you reach the death animation? It likely is just looping back and forth so that is stuck at the first frame.
Honestly, you should probably just ditch the unity animation tree.
anyone?
Animancer question... Given plain clips without FSM integration, can a single animancer component play multiple clips at once or would I need a dedicated component for each clip I'd like to play / control in parallel?
Could anybody help me with this animation? Inside Blender, picture the armature climbing on top of a cube, and it looks as you'd expect. Here, it seemas as if the armature can't move at all. Even when I use root node animation, it kinda bugs out. The animation drops way down
Here's what it looks like altogether. (Yes I know i have some code work to do, only making sure the climbing bool gets set RIGHT when we're about to climb, for example)
I know this is no help and I have no idea what I expected but I busted out laughing. I hope you get it sorted 🤞🙏
Yeah I was on the brink there, when he slotted himself in though, couldn't hold on 🙌
Anyone know why my animation rigging rig isnt being updated? If I disable and enable the rig builder it updates but just for a frame. I'm just using a rig with 2 two bone IK constraints for my FPS arms.
use root motion and mess around with the "root transform position (y)" settings in the import settings of the source file
I think if you set a root node the position y menu goes away, no?
Also when I set root motion in code, you get what you see. When I set a root node in import settings he falls to througu the floor at the start of the anim
hi ppl,I had a problem which is strange to me ._. I import some stripped animation with root motion and configure them as humanoid, and the problem is that the preview window shows the 180° rotation ones are actually giving like ~145° . How could I debug this or fix it? I don't even know how to google this.... But I checked the raw animation files in maya and their root rotations looks fine tho
Can someone tell me why the transition between any state and jump is getting triggered once more even though its only condition (isJumping) is already to set to false when it triggers the transition for no reason
as you can see this in this screenshot the condition is off, but the transition is getting triggered
right now you should have transition from run to jump and back, no idea why you have connected to the any
also it seems like something is triggering the transition because you dont have a transition that goes back to it. do you have code to share
i tried using a trigger instead of bool
It seems to have fixed it for now
but do you know how i can make it respond instantly to the jump button and trigger the animation, without turning "has exit time" off. Because whenever i turn that off the animations just break or loop
hasExitTime simply means play until end of animation.
can you show how your are triggering the jump animation
but we would see how you are triggering
also i am not sure if the checkbox you showd above really shows the state if changed by code.
would not rely on it too much
also keep in mind you could simply use animator.Play() if you want to brutfoce the animation to play. i would not recommend it tbh, never had a situtation where i had to use it.
hope that helped you.
unity peoples i have hte most weirdestest of a bug and i need the assist
does DOTween only work on objects with a rigidbody
or is this a weird interaction between DOTween and probuilder objs
nvm fixed
You can construct a blend or use multiple layers
I haven't done the former "by hand" before
hey guys
basically i made this animation of a gun shooting and now i wanna export the animation to use it in blender. what do i do?
is it possible?
Is there a way to get notified in C# when animation clip ends? As in I'm OK to subscribing to Animator or AnimatorController event from the component as long as I get an animation clip ended event no matter what animation clip finished.
I have my own state machine running in C# and what I did so far is on each animation clip I create a custom animation event and I call a function AnimationTriggerEvent on my Character component:
Then in my Character component I call one on the current state in the state machine:
[UsedImplicitly]
public virtual void AnimationTriggerEvent(AnimationEvent AnimationEvent) {
StateMachine.CurrentState.AnimationTriggerEvent(AnimationEvent);
}
This works, but the problem is that I have to create a custom animation event on each animation clip.
How can I make the character stand upright? There seems to be something on their back that is making them look strange.
Install the FBX Exporter package in Unity. Then you can export your animation to FBX which can be imported into blender
hello, for some reason my animation has a little bit of a delay, when i stop moving the walking animation plays for a little bit after not moving. and when moving left to right, for a split second the animation goes to idle state then back to running. Has Exit Time is disabled for both transitions. How can i fix this?
Show how the transitions look like
I fixed it, I didn't see a drop down menu underneath Exit Time.
don t know how i can fix the animations doesn t seem to get triggered has the single attack for charcters with one and 4 for charcters who have all (tower defense)
I have a 3d model with interchangeable clothes. I wanto animate the player but want the clothes tk folow the player. It easy for small accessories like hat and glasses because j can jest make them a child of the bones but if I want to add a t shirt that spans across several bones I can't do that. Any ideas kn how to do that
Animations process through mixamo, try to run them in unity nothing happens
nvm fixed
can someone help me to understand why cloth doesn't move with bones
i set its root bone to base model, but it still seem to be bound with their own bone
might be annoying but would someone mind breifly explaining to me how I can add colliders to an animation thats already setup in unity? I am unsure if I can just add the mesh collider and have its transform position set to the same during each animation or if there is a way I can do this in blender by exporting the fbx? I have 0 animation experience and google hasnt been helpful with any explenations of what I am specifically trying to do
I Think the colliders would be bound to the skeleton/mesh, so they would move with it. it would most likely be a series of small Capsule colliders, and a mix of other shapes, but will not be a Mesh Collider, as they do not function with Skinned Meshes properly, AFAIK. This covers a lot about Animation: https://unity.com/resources/definitive-guide-animation-unity-2022-lts-ebook
also, probably a good idea to check out the Pathways on the !learning site, as these concepts are covered, mostly, but i forget exactly what chapters and where.
:teacher: Unity Learn ↗
Over 750 hours of free live and on-demand learning content for all levels of experience!
I assume you want colliders for attacking/detecting damage?
yes
will they move with the animation though?
every part can have different colliders, and keep them turned off and only enable them when they are attacking
they must be child of things you're animating
like the arm bone
or fist bone
you downloaded the animations from mixamo or something right?
is this something I would do in blender then? cause the animation and model is from the asset store
you did not make them
correct
💀
that might be difficult for me
it would be, but there's no other choice
though there is
most of the humanoid models have a pretty standard structure
expand the zombie's gameobject in heirarchy and send ss
its not a prefab yet as i wanted it to be correct based on what i wanted first
I did have code setting the colliders to each component but that didnt work as it just made like 20 boxes around the model all in same position
click on, say Z_R_ArmPalm
and then play the aniamtion
look if your moving tools (the xyz arrows) are moving with the animation
that might be just buggy code, although it would be easier to just manually add them
colliders and their sizes are a headache if you're trying to predict them
i see
then they are the mesh renderer
click on root bone in skinned mesh renderer component
and it'll lead you to what's moving
it brings me to base HumanRArmForearm
cant be a mesh renderer becuase of the skinned mesh renderer right?
mesh collider*?
you can add mesh collider to it as well then reference the arm palm mesh
bt
that's gonna be very unoptimized for not much gain
ahhh okay
and as you go on, you'll realise every little performance matters
fair
because it gets out of hand REALL quickly
so if that will help me with the animation then what can I do about seperating the Z_R_Arm parent prefab from the animation and creating a copy of it in its place as a detatched object with a rigidbody, simulating an arm being blown off? it works with the mesh collider you can see in another vid I posted that i can repost, except with the skinned mesh being disabled it kinda removes the texture any way around this?
yeah that's going to be they way I think
it can work with capsule colliders too fairly similarly I think
open the skinned mesh renderer
and copy the material
use a normal mesh renderer
trying to add a box collider messes it up a bit 😅
shite
need more info to make an assumption
ooh i was adjusting it using the cursor not the inspector so I was adjusting the transform not the box collider
man this is going to kill me, the UpperArm both left and right are using the Ribcage transform will that still work or should I just set the Forearm L and R as one big box collider for the entire arm?
yeah you can
okay that will make it easier
it doesn't need to be highly accurate because even players like some wiggle room when they SLIGHTLY miss shooting the arm or whatever
okay ill do this for the next 30 minutes then be back to figure out removing the skinned for regular mesh
good luck lol
HOLY FUCKING SHIT I LOVE YOU so much my god jesus 6 hours of struggling to fix this god dam with so many google searches youtube videos and chatgpt requests
well now to test if they work with my bullet / zombie script
okay so it doesnt work with the script but thats probably a coding issue so back to chatgpt for a bit
I h ave some unique issues
I put a rigid body on y ahand so it has hit collisions
but then it just flies away magically for now reason???
Are there any other physics components/scripts acting upon your rigidbody?
no this is all the code for thsi speicifc rigid body
originally it was just collision boxes
but in order to make body based damage work i had to add rigid bodies to each part
So your code is affecting it?
sneidng screenshots
thats it
they work as decting if they were hit by a speicfic projectile
but they and they send the proepr value over but they just fly away
What exactly is ‘’hitcheck’’? And take this to #💻┃code-beginner / #archived-code-general ..
alrighty
OH MY IT WORKS
SUprisignly wasnt the work to impleement just one recursive function was needed
suppose I have an entity that only ever has one animation state, cycling through maybe a handful of frames for the complete animation and never displaying any other behaviour or animation - should I be setting up a whole animation tree for that anyways or is there a simpler solution for a one state loop like that? is there merit to just writing code that cycles through the sprite frames or should I be using a function already built into the engine?
Animated Spline Mesh does not regenerate
Hey everyone! I'm a solo dev and I'm really struggling to get my blender hand/feet constraints to work in Unity. I read somewhere that creating a humanoid avatar in Unity for my rig fixes this, but I can't seem to get the armature right. Does anyone have a humanoid unity-ready armature that I can use to animate my character in Blender?
I made a post about this here:
https://www.reddit.com/r/Unity3D/s/eItM5jJT2y
Any help would really be appreciated. I've been spending entire weeks on this problem.
Thank you!!
trying to use mixamo to create a basic animation and idk why but its not working correctly or im being dumb and not doing something right, I gave my FBX to mixamo and downloaded the animation I wanted but it doesnt work
cant preview the animation and it doesnt work as intended on play
Yo, anyone here knows how to use the Avatar system?
I'm trying to set up avatar swapping, something is not working
My rigs/avatars both have the same rigging, same bone names
they have both a humanoid avatar set to the force T pose mode
I swap out the avatars in the animator, still no animations sync
maybe my hierarchy setup is incorrect?
What errors are you getting?
none, it just wont perform any of the animations
It says there were errors when importing the models.
once I swap avatars ofc
oh, its just since the rig is not 100% humanoid
Okay, but that might mean that it's getting a completely bogus humanoid avatar
which would prevent it from retargeting animations
You could throw in some empty bones
use a legacy Avatar?
If the models have identical bones, just use Generic
oh, alr
Import one normally
they do, both models are designed AROUND the same rig
Then have the other one copy the avatar definition
ohhh wait
I got a VisualPlayer and a feraMonster, ill make the MONSTER create from the Visual
"Generic" has no real rules. It just doesn't support animation retargeting from one avatar to another
"Retargeting" meaning between differently-shaped armatures
If two models use the same Generic avatar, then you can play animations on both
(I'm not sure what'd happen if you just created both avatars from the models)
they WOULD match
I guess you'd just get a redundant avatar definition
Hey ! Sorry for bothering but im not sure where to ask this but could someone give me a hand with one of my projects ? Nothing big but just something animation related i cant seem to figure out
!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
So my character does this when i load the game
Idk why tho
Like the animation "plays" but doesnt really play
and it sticks him halfway through the ground
That's the default pose for a Humanoid avatar
nothing is animating the body
It looks like your animator contains Generic animation clips.
So if i change it it should work ?
If you have two model assets:
- The model, with no animations
- Another model, with animations
then both need to imported as Humanoid
You'll probably then need to re-assign the animation clips in the animator controller
IT WORKS
THANK YOU
Now i just gotta prevent it from floating and acting weird
Thank you
no prob!
Humanoid animations require a human-shaped body, but they let you play animations designed for any human body
even if the proportions aren't the same
Generic animations have no real rules, but they require an exact armature match
Okok
Is it fine if i ask some more questions ?
Cause some other issues came up
My guy is now running in front of the camera
Like its supposed to be first person but now he just dashes in front /
Uncheck “use root motion” on your animator
Root motion makes the animator’s object move around
It’s useful to get accurate movement from your animation, but you probably don’t want it here
Its not checked tho
Also is there a way to loop animations if they are in a prefab ?
Loop Time is a property of the animation clip itself
Not the animator controller’s animation states
Yeah but its locked since its in the prefab
I have no access to i
Oh, you mean it’s a sub asset of the model
Nevermind
Pause the game while this is happening
See where the different objects are located in the scene
This is what i see
I guess its like the skeleton that goes halfway though Narnia ?
Could it be a script problem ?
Hit Z to switch from "Center" mode to "Pivot" mode (image 1). This will cause the handles (image 2) to appear at the actual position of the object
you'll want to look at the position of "mixamorig:Hips"
in a animation layer, is there a way to set the blending mode by code? i've achieved exactly what i like by setting the weight on layer one to 1 and setting the base layers blending mode to additive in the editor but i'm not seeing anything to do it codewise
have searched and so far nothing but will keep searching
appears to be set here
now to figure out how to get that
oh ffs, its a editor class
should've spotted that before
https://docs.unity3d.com/2022.3/Documentation/ScriptReference/AnimationBlendMode.html thats a runtime one tho
hm, don't quite have it but i think its good enough. first layer is additive with a mask on the bones i want to move for this animation while second is override with a mask having everything
both animations are looping
the bits outside are still rotating enough and the whole thing rocks back and forth, the blue thingy at the end is meant to rotate as well but don't think it'll be noticed enough
will need to write a coroutine for setting the weight but i saw that so should be easy
IDK if Unity is monitoring this place or not, if yes: https://discussions.unity.com/t/animation-status-update-q4-2024/1571106
I prefer experimental, using the things as soon as possible, giving feedback Unity can happily ignore. but maybe this time it will be different. No need to support it in prod. You can support and look for stability after beta.
I also prefer if you are hell-bent on waste your time on AI "features", then please make them optional. There are people out here who has zero inclination using any kind of generative AI solutions. I am one of them. I also pledged not to use any assets made with AI. Even if the publisher failed to disclose it and did it only after I can't get refund for those. So, do whatever you want, you will do it anyway, but please, for the love of all Viking gods, make those "features" optional and allow us to avoid them.
So I'm genuinely losing my mind, I have this set of animations (idle_release_closed and idle_release_open) and they just REFUSE to work with the additive mode. They work fine only in override. All of my other animations (including the presented rotator_engage) work perfectly fine on both the first and second additive layers
The animations were imported from the same model, they have the exact same settings, I don't know why they're not working
I figured it out. Apparently additive animations don't like being static. Jesus
My character have a SpriteSkin and an animation
When I run the animation fast, the bones not back to the original position
Someone can help me?
Is the animator built into the editor? I can't create a fork of it?
I've imported an FBX model with a rig and animations into Unity, then created a new animation in Blender and exported just the armature as an FBX. How can I retarget or add this new animation to the existing rig in Unity? I want to add the 'ARMS_Inspect' animation to the 'PSX_First_Person_Arms' rig. They have the same armature.
Or is there another way to create FPS animations where only the weapons and animations change, and the rig remains the same, keeping everything organized? I can't think of another way besides using IK or making each weapon have its own arm model, spawning and destroying it depending on which weapon is being used. This method seems very inefficient to me, as I want a large number of weapons in my game, or even a modular approach, with attachments, etc. Therefore, a procedural approach with IK seems to make the most sense to me, but I have no idea how to implement it. Are there any good FPS focused tutorials on the subject?
Or if my first approach is viable, how can I add/organize the animations to work with a variety of weapons? Currently, my idea is to export the arms and the gun separately and then synchronize them in the engine. This would result in the arms having hundreds of animations, but it seems like the best approach I've found so far.
Would it be possible to replace a number of Override Transform Constraints from Animation Rigging package with a single Job that uses AnimationHumanStream? I need to create a bi-directional bind between bones and rigidbodies for a ragdoll, but maintaining a double set of constraints is a nightmare.
Import them both as "Generic" animations
you can have one copy the other's Avatar definition
as in, an animation that only has one keyframe?
I remember having a lot of fun with this
(the un-fun kind of fun)
That and the fact that additive animations use their first frame as their base
Such a headache
Yeah.
I'm struggling to import some animations from blender as an fbx and to have them appear correctly in unity.
so there is the gif of this recoil animation looking wrong in unity. it looks like the foregrip hand's ik target got baked on the ground. it is supposed to stay glued to the grip. I'm assuming this is because the gun (which has the bone that his foregrip constraint targets) and the guy are in two separate blender collections, and i am trying to export them as two separate fbx files. should i just cave in and export them both together or have any of yall done this before and could clue me in on the arcane knowledge to fix it.
the fix is probably more of a blender thing than a unity one, but i figured this is still the best place to ask.
If I have two transitions for an animation at the same time - one with a transition parameter and one without - will either take priority, or should I offset the first one slightly?
you'll likely have to bake the keyframes for this in blender
sometimes, the bake on export doesn't do things in the right order, for example it might be baking the front hand before it does anything else
Im actually doing a lot with exporting weapons and their animations separetely, too
i'm not sure if i understand the question. which one do you want to play in that scenario? i'd say you should add another condition to explicitly disallow one transition if the higher priority transition condition is met.
im just answering based on how the situation smells ngl. i dont use the built in animation state machine with its GUI and stuff. i just replace it entirely with c#.
Thanks. I will look into that.
I guess I can just go in and keyframe the positions of the hand manually.
I will never understand unity's animation system
if I have a bone that starts at a position, then I add a keyframe that moves the position down, why the hell does it move up, then down in the animation
why would that happen
because the animation told it to move up, then down
the animator does exactly what you tell it to
You can switch to the "Curves" view to see if there's anything funny going on
I have an IK rig, and the animations work fine, but the transitions look really ugly because the hands and feet are not parented to the forearms so they don't transition well are theyre just going linearly to the transition. how can i fix this?
i kind of solved it, the issue was i put the animator on the prefab instead of the armature/rig so it didnt work when i tried to use the armature motion from the other fbx
ah, yeah, animation clips store a path to the target object (plus a property name)
so is this good practice? i think i can override the (arms) animations so it matches the gun i have at the moment, and then i just synchronize the gun and arms animation, right?
and also, I can have everything organized as every arm + gun animation "pack" will be grouped on a single light fbx with just the animation data
correct me if im wrong im kind of slow lol
Is it possible to override a position of a bone from IWeightedAnimationJob? For some reason SetGlobalTR applies only rotation.
For some reason it works with pelvis, but not with any other bone. As if Animation Rigging applies implicit constraints on the distance between bones.
I've never done this kind of animation, so I don't really know!
I need to figure that out eventually
yeah i guess thats what ill use for now
also dumb error but i dont know how to google it
i've tried with bool, trigger, int but none of them work, it keeps updating before ending the loop
You have "Can Transition To Self" set on the transition from Any State
Unfold the Settings in the transition's inspector
(or whatever the text is; i forget the exact wording)
any ideas why my avatar mask isn't working? I have the bones selected, want to animate only the right arm, but the all the other bones go into t pose
Hey there! I am trying to do something in unity but I am having a hard time achieving it. I am trying to play an animation when a UI button is clicked(Without any scripts), can someone help me? thanks
What I am trying to do is when the Left UI button is clicked it plays the animation
anyone know a solution to this?
I've got this character imported from mixamo where I would like to separate the head from the rest so that I can stop rendering it while keeping the shadow. How can I do this while keeping the same bone structure?
you trying to add a first person camera to it?
I'm not really sure either but in project settings i belive yoou caann adjust the nnear plane clipping or something like that
let me see if i can find the setting
You can do that in the camera
inn camera settings of you camera adjust the clippinng
oh boy
i actually was gonna try the same thing with my characters
very new to ik myself
but based on what i have learned you nneed to have a linnecast from the feet to the floor annd use a constraint
let me try to remember exactly which one
But do I need to blend it with the animation?
two bonne constraint
im not sure
i would try applying it at a certain point inn the annimation
so if the charactrer is doinng a walking animation, i would keyframe the point inn the animation where the foot should be on the ground and use that to set a bool that would determine when the ik should kick in
im not sure about that though
does anybody have any fimiliarity with active ragdolls. I set this one up with my character but he ends up twisting himself like crazy. i used configurable joints:
Do you copy each bone transform on a separate armature or apply it directly over animation rigging?
i made a configurable joint for all the limbs and spine objects (excluding the hips) and assigned all the game objects connected body to the object they are parented to. Then i made a really basic script for each limb with a config joint that will set the target rotation of the joint to the same as the animated one.
I made it so that it no longer twists itself up, but every movement of the main character is seriously amplified to the point that just barely moving the animated character causes the active ragdoll one to bend that limb extremely far.
• Try use https://docs.unity3d.com/6000.0/Documentation/Manual/class-CharacterJoint.html. For what I know, an animation-driven ragdoll doesn't need a complexity of configurable joints.
• Check in which space a rotation occurs. When I tried to bolt animated bones on rigidbodies, I learned that rotation should be relative to parents or something.
• One framework I came across uses .Sleep() on rigid-bodies to tone down physics at earlier stage of ragdoll animation.
im using configurable joints for my rope but when and object collides with it above snail speed it freaks out and starts clipping and flying any idea on how to fix this?
either that or it ignore collsion
Maybe this is due to the mass difference between collided rigidbodies and a collision method or the rope rigidbodies?
i realized that teh capsule colliders in the rope get stuck inside the box collider casuing them to extend beyond their range to try to no be within the collider
but i dont know how to fix it
also if i were to have both sides of the ropes not attached to anything how would i do that
specifically the usual anchor point. what rb should i connect it to if the rope iosnt attached
You could flag the first segment as kinematic to lock it in place.
Hi, anybody know if there are any like kneeling, crouching, squatting animations somewhere to buy for Females but that are nothing related to Females that are combat or parkour type of females but just civilians. I don't see any of them. If they are, they always seem like they are for athletes or combat characters. I'm trying to make game of real life interacting with people in town and not all of them will be enemies attacking or battling. They unity assetstore doesnt seem to have anything like this
How to disable interpolation for animated values between key frames?
If you do want to do this, you'll need to edit the actual model
You'd just split the head off from the rest of the mesh in Blender or whatever
this would give you two skinned mesh renderers that use the same armature
(you could also just shrink the head bone)
ok thanks ill check it out. alsoo, Is this a good direction to go to create more realistic deaths for enemy npc in a fps game?
Found how to do it: RMB on the keyframe, left tangent, constant.
Depends on the definition of 'realistic'. Ever since I've discovered few days ago that Animation Rigging doesn't allow arbitrary movement of bones, I'm trying to convince myself that a blend from a death animation into "passive" ragdoll is more realistic. For example, https://youtu.be/pPXkqJ0zOps.
yeah that is much more the look I am going for. I think I will incoporate that. the reasonn I want to use the active ragdoll is because I want to simulate uhh... suffering on the ground. so i only need the active ragdoll to turn on after the enemy has competely ragdolled and fallen to the floor.
Oh and thanks so much for the idea of using character joints. I have the active ragdoll working much better. I told chatgpt to write the code tho cause I wanst about to deal with quaternions
Do you plan to blend the character back into standing up animation?
I have considered this. I'm not sure honestly bc I have heard about the difficulties incorporating this. Although, now that I have an active ragdoll it would be much easier. I will have to see how things pan out with transitioning between animtions, ragdoll, and the active ragdoll.
I tried this with one armatures, and binding animated bones to rigidbodies isn't trivial. Based on your experience it should be easier with two armatures.
yeah i just made a quick script to binnd the animated character to the physical oone to test it out
hi, i have an animation in an instantiated prefab that's not playing for some reason. the debug.log statement after i set the anim trigger IS actually debugging something though.
any errorrs in the console?
do you know any good tutorials for how to do this? I get a big jerk from my character when the ragdoll is enabled.
Select the object and look in the Animator window
You'll be able to see what's going on inside the animator
Big jerks often show up when there's overlapping colliders or over-extended joints which the physics engine automatically corrects with forces
That's more likely to occur when the ragdoll is instantiated in a pose
Pls someone help, how do i set up this animation so i can go from any state to another without making a 6 node complete orientated graph out of my animations and transitions 😭 🙏🏻
should i try disabling the coliders foor a couple frames and then turn them back on?
I would not count on it but I guess it doesn't hurt to try
I'd put all those in one blend tree
what is a blend tree
You guys know when you import a sprite from Aesprite, and its a 64x64 frame with like empty space surrounding the sprite, but when you import it in, all of the empty space on the right gets deleted and now your sprite is at an offset? how do you prevent that
does anyone know if theres a good video on getting animations from blender into unity, id like to make some somewhat cinematic things and I dont understand how id lock the player into a cutscene animation and stuff. or like if anyone knows a good video on how to do that kind of stuff without blender id like to check it out. because animations being imported seems weird to me and I hate going back and forth with my animations just for one little thing to be off, and I just dont have good workflow yet
somebody suggested this and im wondering have any of yall done this? is this efficient?
Export the blender file as a fbx for the animations. Timeline is a good tool for cutscenes, unless you mean’t prerendered cutscenes.
no i don't know about that, can you show what issue you're having exactly?
if you're importing aseprite it should give you separate sprites for each frame and also an animationclip
i have an animation in unity, i need to assign it to a specific gameobject without recording a new animation
(i need to copy it multiple times)
any methods?
what exactly is the issue you're having? what are you trying to do?
why would assigning an animation to a gameobject necessitate recording a new one?
mainly with assigning the gameObject for animation to take affect on it
my plans were to make an animation preesets and just copy paste them for UI elements and assign what button calls what animation
it looks very nicely but i cant duplicate it and assign it
ah i'd guess those take references
perhaps make those gameobjects inherit from a prefab?
and then set the animation on the prefab
idk, i have theese, my first time working with animations
all of the animations i did were procedural very complex trigonometry in 3d but this is simple 2d
i mean, internally they probably work on references, so you can't really duplicate them
but you could use a prefab to do so
so i cant change the object marked here in red?
not automatically probably not
Do I export the mesh separately then the animations? Because the animations are read only when I import everything together and it just doesn't seem to be working
I mean I can't effectively add new animations without reimporting
can someone here help me with an issue on animation layers and anim masks?
it's a bit complex. I have an issue where I play the same animation on different layers, but it looks different than when I play the same animation in a full body layer, and when I pause and look at the animator window they're desyncronized with their time, even with me starting them from 0 on the same frame
I've started them on the same frame
I tried to export animations and meshes seperately from blender to unity to try and assemble them in unity but it wont work does anyone have any suggestions or a good workflow they use to add animations. the issue is, if I export it together I cant easily add new animations I make without deleting old imports
... I think i've fixed my own issue by marking "Timing" on animation layer 🙂
What kind of objects are you animating?
this creature
Im not familiar with avatars or animations too much, I know how to import them and code them in and stuff but I cant add more later without redoing everything
someone suggested saving the blender file in the unity game asset folder but I was trying to figure out different ways
You should be able to import additional animations for an existing armature
Just remember that Unity/Unreal can only import basic rig constraints.
well what do you mean by constraints because right now my rig is just weight painted, its not really "rigged" its just the skeleton thats it. I did import animations in seperately but I really have no idea where to add them since its all a mess. when I did add them the model just dissapears when the animations play
Like Blender IK, copy location/rotation, squash/stretch type stuff
Sounds like you’re fine if you don’t know what constraints are
just loc, rot, scale
I dont worry about constraints but I just cant import the animations and get them to attach
Ok, so have you managed to make any of your animations you imported into Unity work?
yeah but the problem is, is I can get new animations in and connect them to a model I imported with animations previously
like this works. but I cant add more to this import later
just bring it in as a new import
the whole thing?
just the new animations
not even needed
in the Import window for this new FBX with just animations in it, go to Rig, select Generic and Copy From Other Avatar. Then pick your existing avatar
so I pick the old avatar on the new imported animations or other way around?
existing avatar on the new animations
Does anyone have a good idea of when the experimental version for this actually going to come out? Every day longer it takes is another day I can't learn how this actually works.
https://discussions.unity.com/t/animation-status-update-q4-2024/1571106
Based on what they've written, maybe official release 1st half of 2026? I think it's gonna be a while as it's an ambitious overhaul.
so could I just drag the animation from the import onto the animator tree thing?
Yep
ight
I just tested the process myself again using a non-humanoid I have just to be sure.
Hey no problem.
i fixed it. i exported the sprite anim as a PNG instead of an aesprite file