#🏃┃animation
1 messages · Page 13 of 1
Hello people, I'm currently having some problems with step noises on the character walking/running animation, I need to make so that in specific frames from the animation a dust effect get instantiated and the sound of a step with it, but i'm having a hard time syncronizing this, I've tried keep the speed of the animation in check and instantiating when certain threshhold happen, but this has not worked so well, specialy when I change the moving animation for a running animation with diferent momments that the steps happen
Anyone knows a tutorial to help me make this synchronisation happen properly?
I know we can create codes on the animations but I have no idea how I can use that for my advantage.
at least not in the moment
How are you currently matching the effects to the animation, and when does the desync happen precisely?
not sure if this is the correct place to ask but Im having a problem with this character... When I import and designate it as a 'humanoid' rig, the "pill" wireframe around him is centered at his feet. I thought originally it was because the hip parent layer was positioned there, but I switched the rig to generic and assigned the root at the hips and still had the same problem.
What do I need to do?
after fiddling around, it was the character controller setting 'center'
so Im trying to get procedural walking working in my project. Im very new to unity but know a fair bit of coding and some very basic animation stuff, but safest to assume I know little to nothing about what I want to do. I've watched almost every tutorial I could find on the subject but I cant seem to find one that explains the process from beginning to end that actually works or is explained well. I've tried following unity's guide, filmstorm's (which I like the most but cant get the movement to work), and a number of others. Does anyone have a tutorial that they found very helpful when learning to do something similar?
You might want to explain what exactly is going wrong in your attempts instead of just hunting for another tutorial that may or may not work
sorry, obviously it varies from attempt to attempt, but the scripting side of things is seemingly fine, no errors. but when it comes to actually getting the character to do anything is a struggle. Even on the attempts I have gotten the characters legs to move (for example) the character just breaks and homes to the starting position (i). On other attempts I can get the script to work, and the legs to find their correct position but I can't get the character to move using their system [mostly because they left the movement system out of their tutorial and I had to sort of piece together what I could] (ii)
i:
ii:
the second of the two is partially due to me attempting to use both a vector based movement script on a root motion based system, but the video was taken with root motion turned off.
Without the vector script I can barley get the character to move at all (it will change animations and reflect angle and position changes in transform.position) but it wont move more than 0.1ish units from its starting pos in any given direction.
the first video was my attempt at using the script from unity's tutorial https://www.youtube.com/watch?v=acMK93A-FSY
and the second was using filmStorm's https://www.youtube.com/watch?v=MonxKdgxi2w
as I said before I believe the second system is much more robust, but I can't quit fill in the gaps left by the tutorial
In this episode of the Prototype Series, we've expanded the Procedural Boss project by creating a procedurally animated walk animation!
⭐ Project Download https://on.unity.com/3jX6PAY
⭐ Training Session https://on.unity.com/3atx3rW
⭐ Procedural Boss video https://youtu.be/LVSmp0zW8pY
Timestamps:
00:00 - Intro
00:54 - Setting up the rig
03:55 -...
Join our Filmstorm Motion Library: https://www.patreon.com/filmstorm
Download the project here: https://filmstorm.net/create-an-ik-foot-system-from-scratch-in-unity/
QUICK FIX--- I missed a crucial step, in the Animator you need to have your layer setup with IK Pass enabled. Here is a screenshot for what needs enabling: https://imgur.com/a/5Qk...
Hey guys, i have a head look IK movement however if I do a 360 with the camera, the head snaps to the opposite direction. Any ideas how I can make it smoothly rotate back across?
Video for reference
would this be the place to ask if i need help with animation?
having trouble setting up a basic rig, I've done it in the past with little to no problems but this time around it throws these errors every frame once the 'viewTarget' is added; which is just an object with an effector that the multi aim constraint on 'headTargeting' can track to
Why are you using root motion at all? You aren't trying to move your character based on the animation, you are trying to animate it based on the motion.
im just attempting to follow the tutorial, I dont know the best approach to this kind of movement
I suggest having functioning locomotion before trying to get the legs to fit
Makes it easier to test at the very least.
The leg motion is pretty much cosmetic, right?
thats sort of what I tried to do, at the beginning of the tut he has a movement script based off what I assume are root animations. I took that portion of the script and tried to get movement out of it. He didn't show how to do any of the animation stuff, so I watched some basic tuts on animation so I could give an attempt at reconstructing his blendTree, which can be breifly seen in a section of his video. I did that and got the character to animate properly, just not move. Which is when I realized that he was using a third person camera system, and the code suggests that the cameras position has significant bearing on the players position. ++ My project is first person which is where I get lost, at least with this particular tutorial, becuase I don't know if what I have works fully with a 3rd person setup, much less with a pov one.
I agree, im just following whats available, do you have any suggestions for where I should start and how I could implement IK/procedural animation?
It feels like you're worrying too much about what the tutorials do rather than working out what you actually need.
I'm not even sure why you need procedural animation here.
I suggest starting by describing what you actually want to happen in your game rather than 'like this tutorial but also that one.'
I want to have a character that is firstperson controlled (IE; walks, jumps, sprints, etc.) thats legs properly adjust to the terrain/platform it is on instead of floating in the air
all Im asking is if there is a resource that will help me get to that result that is complete, and not something that is half explained
a final addition would be that the reason I like the 2nd tutorials logic better is because the majority of animation is still handled by actual animations instead of code, which tends to be more 'natural' looking. While procedural looks great on non humanoid characters, humans get funky. In the tutorial all that is happening is a movement system based off traditional animations, which are edited by code to align the legs/feet with the ground height via raycasts. In unity's version (and many others that I have seen) use things like trig functions to get a "walking animation" which dont look great.
I know IHeartGameDev is making a tutorial on this exact thing, but its not out and only his intro video exists which is one of the best on the subject. But until then I am at a loss
So you don't actually want procedural walking at all.
I don't even suggest using the animation rigging package for that- unity's built in humanoid IK is perfectly suitable.
The main tricky thing is switching control between the animation and the IK- most implementations I've seen use an additional curve added to each animation for each foor to control how much influence the IK has. Then, as you say, you cast a ray from the foot position to the ground and set that as the IK goal position for that foot, weighted by the animation curve.
I don't have a convenient tutorial, before you ask.
Just bumping this 🙂
Just to clarify: I am not an animation expert.
I'm working on a project where the Mesh of a character is procedurally generated, due to customization and different variants of some limbs. What I do currently is import different parts of the character into Unity and load them in. I generate the mesh using Mesh.CombineMesh(), however in doing so I can no longer use the rig I made for the model parts. To solve this, I generate the bones for the BoneRenderer based off of the different bones I made for the model and apply the same bones to the SkinnedMeshRenderer. However, when I try to move the bones, the mesh does not move with it. Does anyone know why this could happen? I also tried to manually set up the rig once the model was generated, but even then I couldn't get it to work.
Can't you just add a lerp to the rotation to avoid snapping?
Are you copying the bone weights and properly assigning bones to weights?
Well the issue is when I go past the 360 degree point
Ah, I misunderstood. Try using quaternions instead of degrees?
Well currently the lookat transform is attached to the camera
It's using the lookat ik
question about unity timeline... what do you do when the camera rotates the wrong way?
I have it go from 270 to 180 - and instead of turning the simple 90 degrees, it turns THE COMPLETE OPPOSITE DIRECTION >.> - it still lands on 180 but like.... shouldn't it go the shortest distance?
why in hell is the this happen? im using a skinned mesh renderer, this is the crorect model. i got this from files from a game
Asset ripping or problems stemming from it are not a topic for this server
uh ok
whenever im reloading and switching weapons and then back to the original weapon i reloaded with the animation gets stuck.
Any fixes for this?
Anyone know a good asset bundle for sword animations that include blocking that is one handed?
I figured out after my post that I did in fact not do that, unfortunately I do not know how to do that correctly. The Unity documentation is really vague about how to properly use that in my case. If you know anything about it, please let me know.
That is a euler vs. quaternion issue; 'shorter' is a complicated concept where rotation is concerned.
I've not done it with merged meshes so I'm not sure what to suggest; if the weights are retained, then it should be a (relatively) simple matter of assigning the correct bone indices. If they aren't, then I have no idea.
You haven't really given us any info about your setup so it is hard to tell what might be going wrong.
When debugging the amount of bone weights of each mesh, I always get 0.
well to play animations im using Animation and AnimationClip
As in the depreciated Animation script, or...?
is it possible to reset an animation?
oh actually im not even using my Animator
im just using the Animation component to play the animation
Yes. Animator and animation are mutually exclusive. You can use one or the other.
this is the problem im facing
It is probably an issue with your script. I'm not super familiar with the details of that script; I usually use the animator instead.
Most likely you're changing the playing animation instead of playing a new one, but I dunno.
sorry for the wait, I manage to find a turnaround to this using animation events.
how do you scale negatively in the animation key editor?
I can not find the option to scale the keys
The blue bars can be dragged to resize the distance between selected keys
Drag the left blue bar beyond the right one to reverse their order
Awesome, thanks. That worked. @agile solstice
My _Attack animation is a full body animation and my _Run animation is only a lower body animation. I want the player to keep playing the attack animation (like auto firing) in the upper part of body. When player press WASD, the lower part of body can perform the movement animation while the upper part of body keep the attack animation.
However, if I implement AvatarMask, the animation is kind of bug where the head of the character is looking right and left. If I dont use AvatarMask, the attack animation works fine. How to fix it?
i dont think you even need to do this
you can just set speed in the animator to -1
I have animated a parent with 16 planes, but when I place it on the game screen, it is positioned incorrectly at the bottom. How can I fix this?
If they're "planes" sounds like there's nothing allowing them to adapt to screen sizes
You'd use UI components (images) with anchors and scaling for that normally
Please use a screen recorder next time, can't tell what I'm meant to be looking at with all the blur and shaking
16 planes animating. Its has two shader, there is one plane that you can see like a screen to see all 16 planes.
Why planes instead of UI images?
I don't see why UI images can't be easily changed, but if you don't want to use them then I suppose you need to implement your own anchoring or scaling if you want the application to be usable in multiple resolutions
Basically, the main question is that I animated an object with purehub but it doesn't work in game.
"Purehub"?
Ah, that's probably it
The issue probably is that your Game window and application have different resolutions
Without a scaling or anchoring system such as the one UI Canvas components have, you probably cannot fix it
Unless you set your Game window resolution and aspect ratio to the exact same resolution your application will run on, and adjust your animations to match it
But that would not be really practical
(because users have different screen sizes and they'll want to change the resolution anyway)
I mean,
Sorry it happened in game screen in Unity, Scene.
In scene, ok.
In game scene, it dose n't work.
I'll change the question, for example, how can I put a parent on 16 this cube, animate it and make it appear correctly on the Unity game screen without changing the coordinates?
Well, scene and game views will see things differently because the game view will only see what's in front of the camera, but beyond that there shouldn't be any trick to make things appear "correctly"
Maybe the shader you're using adds some texture offsets based on camera properties, hard to guess
No, this shader does not add texture offsets based on camera properties. However, this shader does have a stencil test to function as a window mask. Additionally, the MaskedObject shader and MaskedObject/Sprite shader may contain code to enable alpha splitting.
Hello guys, please tell me, when i export my fbx model from blender with my NLA animations to Unity i get all his additional crap! where all these keys came from?, whats goin on ? its messing up my animation badly and all keys are shifted for some reason! :c
I have no idea.😭why?
I would guess they are from animation baking, and the problems could be from keyframe compression
But usually those are not expected to "mess up badly"
I did that andit did not work
It should work, and it works since 2018 editor, however, perhaps there is a bug with this version of 2020
I assume negative speeds do not work for Timeline as the forum post says
I thought it does work for ordinary Animator motion, though events would not fire properly, so there's reasons not to do it
How do i reset the X and Z value for all keys in a animation within unity? not from code or whatever, just straight up reset the keys within the editor.
You don't.
That is, there is no built-in option to do that without code in the unity editor.
Unless you count manually selecting every x and z curve and clearing them.
does anyone know how can i just use 1 potion of the asset?
You need to slice the sheet in Unity to separate them into individual PNGs. This is something you can easily find a tutorial for (and it's very easy to do.)
ahh ok, im learning how to animate my first assets
but idk where i can find free assets 🤔
its normal to dont get the sample here? @uncut salmon
Click the three dots at the top right of the animation window and make sure 'Show samples' is selected.
Does anyone know why this happens, all I am trying todo is make the cam come down from the sky and into the house, now I want to use timeline. but right now, it is making me think different. Anyone had this problem before
Hey guys, I just finished my first player character in blender, including rigging/animations. I am not overly fond of the action editor / dope sheet system in blender, so I wondered if doing the animations for humanoid characters in unity is actually the better choice?
Can you help me on that matter?
What are these bones that I didn't add? They do not appear in the avatar config or in blender, but in the editor they show up when using the bone renderer. When selected, it selects the entire character
It's probably the root bone of the armature, which in blender is juut the transform of the armature itself
Since your character is modeled on an offset from its local origin, that's where the root would be placed if you apply the transform on export
Or maybe it'll always treat the model scene origin as the armature origin, not totally sure
Anyway you probably want the character to be centered before you export
Also you don't have to put every bone in the bone renderer list
It may help to note that Unity's bone renderer component doesn't render "bones" because bones do not exist in Unity, rather it visualizes transform hierarchy relationships
I am sick of having to deal with this bug. Using the two-bone IK Constraint, this is what happens
The transform handle is exactly where it should be
While the bone itself is horrendously offset
And when I change the rotation of a bone that is NOT influenced by the constraint, it puts itself back in the correct position
It's also horribly inconsistent. Some rigs do it, some don't.
how do i use a blend tree to change 2d animations based on speed?
Does anyone know why when I use an additional rig on my character, this happens? The context is there is a rig for two bone IK for the arm holding the rope, and an aim constraint for the pelvis to rotate the body around the hook point
For some reason, the other arm not grapping rope just shrinks to nothing whenever the pelvis rig weight > 0
I fixed it, turns out, having the hand rigs before the pelvis in rig layers caused this issue
It works fine after reordering the layers as above
is there a way to set a dynamic destination for a motion tween? basically like rigidbody's move towards.
anyone know why my animation looks different between preview mode and play mode?
(first one is preview mode, second is play mode)
the feet are incorrectly working in preview mode
Anyone know why my preview breaks the legs?
To clarify it's not the rig, or the animations. Just the preview.
You are rotating the animation clip rather than the object, which is why it goes weird. You don't have any rotation keyframes in the animation, so it doesn't rotate the camera.
Probably because in preview mode there is no foot IK.
The bone renderer doesn't care whether a transform is a bone or not. It'll happily render bones between any two transforms you include in the hierarchy.
Hey, could anyone help me with an animation? Whenever I try to make the object disappear. the little square rhombus dont show up (while im recording) And they only show up when I move it.
The what doesn't show up? Can you show more details?
yes, give me a bit.
here
when I have it hidden as an animation it doesnt wanna do it, but moving it will work
In blender go to file -> Export -> then choose FBX file type to export. Export dialogue window will pop up. You can select what element to export from Object type settings at the right corner. Its simple if you explore more things by your self
Those things are generally referred to as keyframes. I still am not sure what you're trying to do, though, or what your problem is- can you rephrase it?
So when I hide and unhide a object the key frames aren't showing up. I'm trying to do an animation that involves with stuff disappearing reappearing.
and reappearing
...Hiding it how? Are you disabling the gameobject?
If you disable a gameobject with an animator on it, you disable the animator. So generally you'd either put the animator on a parent object, or instead of disabling the gameobject you'd just disable the mesh renderer/collider.
Can anyone help me whenever I reload and switch weapons it makes the animation stuck. Ive looked for several days. Im using the Animation component to play the animation. I will provide as much info as you need to fix this
could I screenshare what I mean to you? cause iv seen people do it the same as I do and they get different results.
-...
hello, I am trying to make this Synty guy to sit on the throne using animation rigging system from Unity, unfortunately I've ran into problems I cannot solve. I want to have my rig as Humanoid (so I can use Mixamo anims with Synty characters) and make an anim using animation rigging, but because muscles my default pose is all broken.
is there a way to turn off muscles in Humanoid?
how would you guys do it?
animation rigging not working on generic character ?
Am i wrong or not
because in my case animation rigging on humanoid work fine instead of generic ?
what should i do ???
It works on generic, but when I set up an empty anim on humanoid it goes to "horse riding" default pose due to muscles 🫤
i made it so the arm disappears in the animation, but when i put the animations into a blend tree the arm reappears. hwo can i fix this?
Hello, is there a way to fix a humanoid animation that does not perfectly fit the mesh automatically?
Basically, I have a bunch of animations that work well on one model but if I apply them to a different mesh they are a bit off.
For example, the secondary arm holding a sword is sometimes in such a position that it's impossible to hold the sword, or sometimes the arm clips through the body.
hi guys, hope you are well, id like to know if its possible to "copy" other bones, this is because i add the model at runtime and i am using a network system that syncs animations, so the idea is to copy the bones of the armature that is synced to the runtime imported character
Hello everyone, i have a enemy idle animation that I want to apply to all enemies in my game, it concerns a y axis going up and down, however when I apply this animation to other units they get spawned in that exact position. Is there any way to make sure the x levels dont get recorded when making an animation in unity?
Animator overrides transform properties relative to the parent transform
If there is no parent transform, you're basically specifying scene coordinates
Place the mesh/sprite on a child of the character gameobject
Hi!
no. Each model must have each own skeleton rigged and skinned under its mesh.
What you can do maybe in Unity is to use the same humanoid avatar running under the animator controller.
Also use different humanoid avatars for each model, but running the same animator controller. However, the skeletons for these avatars must have the same or similar structure
Avatar system supports what's called "retargeting" to transfer motion between matching Avatars
Personally I'd prefer to use the exact same rig between all characters so only the mesh renderer needs to be swapped
How could i use retargeting?
So I've been learning about blend trees. I followed this video. Yet my char is not moving when I go to test . I understand the code and I understand blend trees. I attach script to player yr nothing happens when I press buttons
There's many reasons why something would simply not work so in that situation I'd try to debug log to make sure the inputs are being registered, that the methods are running and that the blend tree weight is being changed
Is it just the blend tree that's not working or animation parameters or input in general? Basically try to pin down where exactly the issue occurs
ive followed the tutorial and it plays the idle animation but only the original character reacts to inputs
Retargeting simply converts motion data to be usable in more types of rigs
How you play the animations is up to you and your code
Blend tree works. Debug log is not same as console, right?
Debug Log prints text to console, so basically the same
If you can see blend tree values changing during play mode but no motion happening, I'd try to confirm that other animations in the Animator do result in visible motion, and that the clips in the blend tree do work for the character even when played outside of the blend tree
Ok so I took the ideal anim and made it default and he's still in t pose
Think i found out why. Let me confirm
Nope that isnt it.
Oh. Would it be possible if I added the new input system. Would that the cause of it not working.
Possibly
You'll want to verify that input and animation both work in isolation to know where to look for the problem
Yeah I added my other script back and it works just fine
Ill have to take a look later. Gotta go be an adult for 12 hoirs
Hours
guys, how to turn off those muscles in humanoid rig? it really drives me crazy
What problem do they seem to be causing?
If I add an empty anim to the Humanoid rig, muscles cause the default pose to be that horse riding craziness
the problem doesnt exist in Generic rig, but then I am running into issues with Mixamo anims
My plan is to use Animation Rigging with IK inside Unity to create an animation of him sitting on the throne and standing up, but horse ridding pose ruins everything 😄
That is the default pose when you don't have any animation playing
I assume you could override it with an animation of the t-pose, or any reference pose you need
yeah I tried it, but then I need to override it with animation rigging IK and I dont know how to do it as the anim is read only
Right, you want to save the keyframes and not just use it for dynamic runtime animations
You can make a read-only animation editable by duplicating it with ctrl + D in project window
You can probably also make your own reference pose from the "neutral muscle" pose by moving the bones or changing the muscle values
jesus christ, I think it may work 🙂
thanks, I will try it
I'd still expect an uphill battle either way trying to make new clips for fully rigged and configured humanoid rigs in Unity
Usually you'd make them in an animation program and only use Animation Rigging for dynamic runtime IK
well, for me getting stuff into Blender, edited and back into Unity is an uphill battle in rainy conditions, at night 😛
but your solution with Ctrl-D works, thanks
Hello, i am trying to learn blend trees, I get that the input values are passed and animation changes depending on it, but how are other anims like collision, sword etc controlled with blend trees? Should I just use the usual transition method?
Can you specify what you mean by collision or sword controlled with blend trees?
Character collision animation, shooting animation, swinging a sword animation etc. Blend trees need a float value right, and they transition from current to the target animation depending on the value. So I pass the float value when I want the above animations to play? Or just use the normal transition way.
What about them?
A blend tree simply blends two or more animations by an external value
As I said, should I control the above animation examples by passing a float value, or just use the the usual way.
Blend trees as the name implies are useful when you want to blend between animations seamlessly within one 'state'
That means it should make sense to change the blend value for those animations while all of them are playing
For one it's useful for walking so you can use the blend weights to control the direction of the movement, which keeps steps in sync and lets blend directions to move without being restricted to a direction
I don't see the point of having shooting and swinging in the same blend tree, since there's not really a logical overlap between the motions, and there can't really be a half-shooting, half-swinging motion to any useful result
But it may be I don't fully understand what you mean by swinging and shooting in this context precisely
OK, I finally get what u meant, it's just that there were no examples where the person used blend trees for any other animation except movement-direction related animations. So I just connect other animations to my blend tree and trigger them when needed? 🤔Or is there any other method to handle such cases?
Doing a specific attack should usually be its own distinct state, since there's not really a need to blend it
Blend trees are used for movement and directionality probably 90% of the time since it does that job so well so that's what the examples are about
But it's just another powerful tool for you to use as needed
You could just as well have your idle be a one-dimension blend tree between something like "happy idle", "neutral idle" and "sad idle" and then control the weight smoothly based on gameplay events
Animation layers are a similar tool, since they have a smoothly adjustable weight also, and can even be synced with the base layer
Really appreciate the detailed explanation. Thanks a lot! Will check out anim layers
Hey all, new to Unity.. have a bit of a weird one.. I am working with a pixel 32x32 image, I sliced it and animated it.. it works great, however whenever I move "Down" the image gets very large, but all the other directions are back to the size I want.. here is an example
https://gyazo.com/c3fb3773a65a4efe881354f9bf9f6fea
Oh I figured it out, I fat fingered my pixels per unit on that particular image 😂 .. oh well.. you win some and lose some
Does the animator limit the amount you can change your animation? There is no difference between 1.5 and 555 for me so it must be it. Or does it depend on FPS?
????????????????? depend on fps
Amount of what you can change?
At least animator state speeds aren't clamped
I can confirm that 1.5 is fast and 555 is way way faster
I don't know. I notice my anim being slower when I slow it down but it doesn't go faster after a point
is that weird?
Can you show an example?
Framerate will of course limit the visible motion so you will get weird behavior past a certain speed(which will depend on the animation)
Good Evening. This is my first time using sub state machines in the Animator. I can transition INTO one (As seen at 'A') using a bool, But when my bool goes false, it doesn't seem to transition OUT of it (As seen at 'B'). Is there something I'm not understanding (obviously)?
i think i figured it out. I was trying to transition from 'any state' to 'up' (see 'A'), but apparnetly you can't do that. So, now i'm transitioning from a specific state.
thats one way to use substates
it's hard to explain tho
also using any state can lead to bugs
well not bugs, just unexpected behavior
Hello, I'm using animation Rigging package and I've a chain IK constraint, when i start the game try moving it the target it works fine as expected(all the bones moves according to the target) but in my script when i deactivate and reactivate the object all values of the chain ik constraint resets to zero.
I've made a script to store initial values of the component and apply it re-activating, but just wanted to know why this happens, and if there's any other way instead of writing a script. Thank you.
Also when I again manually deactivate and reactivate it from inspector(when values are 0) it again go back to 1 (expected values).
When I slow it down, a see a difference but not as big as it should
It really seems to me like there's a limit to speed change; that what it seems like
Maybe I can just condense the keyframes in the animation I guess
Oh, blend tree motion speeds
I just tested with animation state speed
So there's a clamp and I need to edit keyframes, I'm guessing
cause the diagonal animations don't match the speed of movement, they need editing
Hmm no clamp
alright but speed is still not being changed for me
also, wtf can't you edit multiple keyframes at once, or am I stupid? I'm trying to make all keyframes for a body part the same value so I can easily ctrl+z it but it doesn't let me
I don't think there's keyframe multi-editing other than moving them
@robust perch Nothing sticks out here
Except that the blend weight really matters for speed
When in this example the Run threshold was too high for the weight to reach, the speed was interpolated to a fraction of the expected value
Also I'd use a temporary extra sun light when doing test videos
The darkness makes it hard to see what's happening, especially when the video compression muddles low contrast areas further
Sorry
Wait, I'm using a clamp action on the diagonal movement
so he doesn't move faster diagonally
could that have an effect?
the vector is clamped at .71 .71 when moving diagonally
I mean, all that matters is what you're feeding into that float from your script
If you're only blending 71% then you'll get 71% of the increased speed
Your diagonal motion thresholds are at corners at 1, 1, -1, -1, etc so your diagonal animation won't ever play 100%
ahhh
If I understand correctly
It'd be useful to have your blend weight sliders visible when you test like I have
wait lemme just unclamp so I can test
Or just set the blending to be at the right position on the 2d blend
OK yes it's that
Indeed the threshold could be set to .71, .71
thank you very much
I understand
Will do that
very simple
works beautifully
thanks guys
How do I import multiple mixamo animations?
So, I've imported a mesh into mixamo, rigged it, and then I imported the rigged mesh into blender to paint it, I imported it back to unity and created an avatar with the rig, but then, when I try and import an animation directly from mixamo to unity, and tell the animation to use the avatar from the skeleton imported from blender, it tells me that the root bone doesn't match because they are not called the same
The root bone on each animation is called just as the file, while the blender one is called "skeleton1". The avatar doesn't make use of the root bone and the rest of bones are called the same
I exported the rigged mesh (from mixamo) with skin, and the animations are exported in the same format (fbx) without skin
Here is the error (disclaimer: i changed the root bone of the skeleton in blender to match one of the animation file ones but, of course, it only works with that animation and none else)
Funny thing is, if I import a rigged mesh directly from mixamo, it works
Root bone names dont match, but they dont match with the animation either, and still, the mixamo rig works and the blender one doesnt
It doesn't matter if you don't use the root bone. Unity uses the root bone to find the bone hierarchy and root is the first one
if it can't find root, it can't find anything
Then how does it find the rest of the bones through a root bone that doesnt match that of the animations (the direct mixamo-unity import) but not with the other (mixamo-blender-unity import)?
Blender import and mixamo import avatar hierarchy
Hierarchy of the avatar created by the animation
Welp, just found out blender just adds a root bone because of reasons
Why would you tell it to use the wrong avatar?
If the structure isn't identical, you can't reuse.
crits on this player sprite? Its for a endless runner space game.
Blender is cool like that 🤪
how do I make buttons leaving and buttons coming in immediately transition back to default state when the animation finishes
they both have parameters telling them to go to those states im just talkign about coming back
i have a top down 2d dungeon crawler game im making. whenever my charcter walks into a wall, he flips directions. Anyone know why?
https://gdl.space/joxayikewa.cpp
https://gdl.space/eluyisezup.cs
happens when player bumps into a Tilemap Collider 2d
My guess is that since you are choosing direction based on movement, 'bouncing' off the wall sets the direction to a negative number?
"Has Exit Time" will make a transition happen automatically at a specific time
Ok so crackpot idea here. What if i make it so that it changes his direction only when he moves and when the stick is inputted
Or is that like suboptimal
Hi! I tried to import an animation from mixamo that previously worked correctly but now for some reason it doesn't behave correctly and the feets float around
it's like if the pivot is wrong, and it's keeping the object stable on the cendter instead of the feets
That is pretty normal.
Hi, is there a way to change an AnimationState's Motion at runtime?
My ideal solution here is making a StateMachineBehaviour that can swap in random motions for a state that its attached too
But I cant find a way to do it
Make a sub graph or blend tree with multiple clips and choose between them randomly?
Might have to do blend tree I guess
I desperately dont want to make a subgraph
I see images like this and think 🤮
My context is jump animation being different each time essentially, but I shouldnt have to make a whole state graph for that
But also, I already have a blend for rising and falling with my "in air" animation, so adding another dimension to blend for random animation seems tedious
The more I think about a 2D blend tree, the more I think its my only option
Ty
If the states will always be discrete, then I'd personally use a subgraph. Not actually sure why you dislike them?
Because having "int1" "int2" "int3" is extremely gross to me, especially when I really just want to pass it any random number corresponding to the number motions Ive given a state
Also my graphs are already quite complex without animation variation, creating subgraphs will basically lead to overcomplexity where there shouldn't be because importantly these animations are not new states, they are just different clips/motions played in the same state as usual
It's fundamentally wrong imo
Tons of duplication, if I have 5 animations for a triple jump flourish, I now need 5 entry/exit transitions to the regular falling animation, which will all largely be the same, its very very gross. The same would be for something else like death animations, which can be nice to variance on. It's incorrect to have 5 death states when actually there is only one in reality
What's int1, int2, int3?
Having multiple, or even any parameters to be part of creating multiple states. See the image above with atk1, atk2, atk3
I mean, you can have one parameter with different values. That's the whole point of using an int rather than a bool.
You shouldn't need a parameter at all. Parameters are for state management, this is not changing state semantically
But fine, Ill work with the limitations, I just think its bad in design
I mean, you don't have to
And, whether it is good design or not, this is a large part of what substates are for.
The issue had to do with the models not being made correctly by one of my teammates. The armatures were never connected, so once I parented them to the mesh it worked correctly. Still figuring out boneweights though in #archived-code-advanced.
Ah, that makes a lot of sense
@hybrid tinsel do you happen to know why Mesh.CombineMeshes() reduces vertex count of a model?
I do know that the docs for that function have a typo
When looking for documentation on the method the results are sparse.
The only reference I have on that method deleting duplicate vertices is from ChatGPT, but when askes on the source of that it refers me to Unity Docs 😅
I toggled the setting "Weld Vertices" in the import Settings, which increase the overall vertex count, but even after that it removes a flat 114 vertices.
While I expected that to be more
Don't trust gpt for anything
It is a bullshit fountain
If I had to GUESS I'd say that it only welds points that are shared by two submeshes and ignores other overlaps?
But I don't know; you'd probably need to test it
is there a simpler way for handling animations that change depending on the player direction?
I turned off Mesh Optimization and the vertexcount stayed the same
Check out Blend Tree
so basically I turn each of the non-left versions into a blend tree and add an animation for left or right
I have an advanced question:
I use Mediapipe: https://developers.google.com/mediapipe/solutions/vision/hand_landmarker in order to track my hands using the camera.
And I downloaded this 3d Model: https://sketchfab.com/3d-models/hand-low-poly-d6c802a74a174c8c805deb20186d1877
Both the library and the 3d model have 20 nodes (I do not know if it is possible for them to align perfectly)
The question is: How do I align them?
You could just move the hand nodes to the corresponding tracked locations, assuming that the proportions match well enough. Or you could use inverse kinematics to match the fingertip and hand positions. Or you could calculate the bend of each finger and apply that through humanoid poses. A lot depends on the exact effect you're tying for.
I'm sure the #🤯┃augmented-reality peeps would have some ideas
alright let me write there. I really appreciate the help!
Does anyone possibly know why or how I can aim down my sights? https://streamable.com/qo7qv0 In the video you'll see the script and animations. Cheers!
Your "aiming" is a trigger so that condition stops being true immediately
Transition from aiming back to idle has no condition besides "has exit time" so it will happen automatically
Currently you have no way to aim and shoot at the same time, nor a transition making it impossible to go from aiming to shooting
Is there a way to fix that so I can aim when rightbutton is pressed? Here's the anim controller now:
Use a boolean for aiming which is true when aiming, false when not
Don't use Has Exit Time unless you want an automatic or timed transition
Decide on a way to shoot and aim at the same time, this could mean having an animation clip/state for aiming while shooting, or overlaying either shooting or aiming with the state machine using animation layers or blend trees
Thanks!
@spiral root Animation layers and blend trees
There's quite a bit of flexibility how you can use to organize animations with them
One option is to use a "synced animation layer" to make a state machine for all motion in one direction, and the synced animation layer to copy the states but swap out the motion for flipped animations, controlling the direction with layer weight from code
right now I'm using blend trees
That works too
That is, assuming you need specially flipped animations
In many cases all you need is to toggle the "FlipX" from the sprite renderer by whatever means
Though that's not always an option, naturally
that was the plan, but then the artist made dedicated not-just-flipped sprites for the animations
I'll look at the synced animation layer option since that also sounds good
yeah that option seems easiest to work with
https://streamable.com/xz4mpv Does anyone know how I can shoot while aiming? I already have my "ShootWhileAiming" animation ready for use, but I cannot figure out on how to go from holding right click to left click and aiming and shooting. Please see the video for the script and details. Cheers!
@unborn wave I'm pretty new to this myself but your approach to animations is a little weird from what I've seen. Normally you use the state machine to go through the animations based on the controller that your character is using. Using your setup it seems like you should set a trigger for "Shooting while aiming" and use animator.SetTrigger() while aiming to transition to that state in your statemachine.
Now my own question for anyone here:
I've got a blend tree set up that's running on 2D Freeform Cartesian. The values are based on the velocity set by my movement controller coming directly from the rigidbody's velocity. However, when I'm moving the character and I go from one extreme, let's say strafing left, to another extreme, strafing right, the animation jumps between the two rather then blending smoothly. Any ideas where I could start to fix this? Seems like there might be two options. A) Fix it so that the velocity slowly moves from one side to the other which will impact the feeling of the movement or B) figure out how to blend these two extremes better.
Lerp the values you feed to the animator but keep the velocity values the same
Ah, interesting idea.
Trying to figure out how to implement this. Right now I'm just feeding the raw velocity into the animator. I'd need to lerp things only in the event that we've gone from one extreme to the other, I think.
Do you know an other way to make a third person shooter character look up and down than with Multi aim constraint? Because i have some trouble that this doesnt work right when the spine is rotated differently default in the animations
If you are using a humanoid rig, you can use the built in humanoid IK.
Yeah, the animator has no smoothing of its own, it just blends based on the number you feed it. And processing needs to be on the script side.
Another option would be to have dedicated 'skid and change direction' animations trigger when you turn at high enough speed.
That's not a bad idea either. Im not near the computer right now but does it sound correct to send these values lerped to the animation controller only on the start of each input? Then it can lerp the start of each input but not affect the regular animations. @hybrid tinsel
Im trying to animate a UI, does it make sense to just do this programatically? is there a way to animate the UI without have to keep a timer?
and also, unrelated to UI specifically, is there a way to do animation with less files? it seems like there is so many files for each animation
There is no right answer; it just depends on the control feel you want really.
how do i make it so that an animation only plays when you press a key? i made a walk animation but it even activates when youre not pressing anything and stationary
You need to have your controller script pass variables to the animator.
Has anyone here got experience with the animation component?
Im currently using it as its perfect for what I need to do but im running into a weird issue where animations wont play completely. Using debug view on the inspector I can see that playing animations always play until time is 1 and then they stop. This applies to animations greater and less than 1 second long and im assuming this is the cause of my issue but have no idea how to fix it
Im making a landing gear animation. I have the animations. How can I connect all the animations under one animation
@twin musk Look at the blend animation tool?
How do I add shadow sprites into the animator?
Have it as a child object
Does anyone know a video showing how to do first person arm and gun animation? I found a few blender tutorials, but all of them create a separate rig for the arms and the gun, and animate them separately, none of them show how to import it in unity, and when I try to do it myself, the animations are out of sync, is there a standard way of doing this? Any help would be appreciated.
So I'm trying to add injured animations using layers in Unity's Third Person Controller starter assets project, but I can't double click into the "Idle walk run blend" blend tree to add the injured animations
I can't double click into a blend tree through the synced layer
I'm following this tutorial
In this Unity tutorial we're going to look at how we can use Animation Layers in Unity, to transition to injured animations as the health of the player decreases.
We'll start by setting up a basic scene with a character that transitions from idle to running.
Then we'll add a synchronised animation layer that contains injured versions of the ch...
Fixed the issue
What turned out to be the issue?
I hadn't assigned a blend tree to the state
I didn't know you had to add animations and blend trees to an animation layer that was done through syncing
Hi, I made an animation in blender but when I get it into unity and play it, it goes to the middle of the map to play because in blender I made the animation start at 0-0-0. Is there any way to override this system in unity?
Either remove position keyframes from the root object, add a parent object eith no movement to serve as the root, or enable root motion in unity.
I fixed it thx
I have an animation that changes the material applied to a skinned mesh, but when i have a mask applied to the animation layer, the material does not change
if the mask is removed, it works, but the mask is required for it to function correctly with the rest of the rig
is there a way i can include the material in the mask?
notice how the wings only turn fullbright red when i have the mask disabled?
Question, is it possible to get animated bone position without actually playing the animation? Like sample animation X at time Y, and then get bone position at that time, without playing the animation?
it would be very very complicated to do
I imagine it would be so 😓
I could simply play an "invisible" animated object and get the position, but I wonder if there could be a more elegant solution with a couple lines of code 😅
You mean the keyframe data or the actual evaluated position(taking into account all parent motion, etc)?
I think keyframe data could do
In that case there is SampleAnimation()
anyone got tips on how i can improve my time animation for example sword slashes it takes a lot of time animating the hands and the body itself moving accordingly, making it look natural. I was thinking that maybe i can use animation rigging to try and get my character to follow the path of an object making it look like a slash but it seems like i wont be able to register the animation since it needs to be in a playing state and not paused.
Hello
how can I change the animations like walking in Unity Starter assets
Change how or to what?
I do know, but I'm not sure what you mean by "change"
You can use the Animator window to see the animation states of the character, and as the movement state is a blend tree you can double-click it to see the Motions it has
These are the mesh import settings, it just shows what animations have been imported with the mesh
Still not sure what you mean by "change"
like i want to change the way he walks
It sounds like you should find a tutorial how to set up an Animator
Generally you cannot use animation from one model with another model, unless they use exactly the same armature, or you're using animation retargeting
okay thank you
how i can make a animation with gifs of the character?
Why is the animation window so laggy? its impossible to visualise an animation without it jumping frames even if i drag the mouse
Not sure I understand the question.
Even when you hit 'play'?
Like my animation works fine in play mode but the animation window is just laggy
like in the editor
and it's really annoying coz I cant visualise what I am doing properly
Do you have burst/mathematics packages installed?
Dont think so
I've that that improves the performance a bit for some people, depending on what is causing the lag
Fair enough, the editor is always slow anyway very annoying :(
but thanks ill look into improvement
Do you have a lot of bones and keyframes? I recall that the Animation window may struggle if you've got a high sample rate baked animation with a complex rig
Not at all
it's very simple character
Cool 👍
I'll check it when I back home, thanks
I need some advice on the unity timeline
I've wasted a couple hours trying to get an answer from chatgpt, so I thought I would ask a human 😉
I have an int parameter which decides if Idle, Animation 1 or Animation 3 should be played, and I want Animations 2 and 4 to be played when that int changes. But what happens right now is that if the int parameter changes, it directly goes to Any State. Any ideas on how to solve this?
Basically I just want it to complete the branch it's on before going back to Any State. Spent 2 days trying to figure it out...
Simple
Don't use Any State
When you make a transition from Any State to a state, that literally means the transition will always happen from any state when conditions are met
So if you ever use it you'll have to make sure other state transitions won't fight it
How do I do that?
You'd have to make sure that the conditions that make the Any State transition happen are absolutely never true even for a moment when that transition should not happen
Because Any State doesn't respect the state machine's flow between states at all
You're basically skipping the whole system when you use it
Because the thing I am having trouble with at the moment, is that I have multiple layers like the one above and if I don't use Any State, if I am in Animation 1 on one layer, I can't be on the equivalent of that animation on another layer that is above this layer
Huh, why not?
I don't know... just doesn't seem to work
State machines on different animation layers don't care about each other at all, unless they're synced layers in which case they follow the exact same state flow
Hmmm ok, thanks for the help! Hopefully I'll figure it out...
I'll try not using Any State again to see what happens
Maybe the thing we should be talking about is that how you want the layers to work together, rather than Any State here
Kinda sounds like you want a synced layer but I'm not sure
Can I DM you?
No, but we can make a thread here
Sure
anyone here have experience with blending clips in the unity timeline?
Sort of
Hi, hamboy. Thought I was alone there 😉
I'm trying to build a scene using mocap files and bringing them into an animation track
I can line them up and even place them so they match up in world space using the clip transform offsets.
However if I then try to blend the clips, the result looks really bad
Ohh ive only ever blended simple clips that mess with colors and stuff sorry
#archived-art-asset-showcase is more appropriate unless you have a topic to discuss
soryy
Hey I was wondering how I could import a Blender 2D animation into Unity to animate a Sprite Renderer
I'm not the one animating my friend is
iirc, you need to use root motion if you want to blend clips properly in world space
I have root motion checked on my character and my motions have bake into pose unchecked
I probably need a 5-10 minute session to help me troubleshoot this.
I'm so used to motionbuilder editing that I'm probably expecting the unity timeline editor to work the same
hello! i've been dealing with this specific animation states based problem recently:
ok so i have 2 states currently, idleanimation and boatmovement and they have transitions between them that depend on whether or not a boolean value named isWalking is true or false, the moment i add however, a 3rd animation state named boatattack and connect it to the idleanimation for example where the transition state is from idleanimation to boatattack and activates when a boolean value named isAttacking is true, my character all of a sudden cannot make movement
so the animation states do work as intended, i just can't seem to move my player gameobject at all whenever i add the boatattack state
Just what is the problem you're having? Is there some specific bad result, or...?
And settings aside do your animations have root motion in them?
Do you have no transition back out of the new state?
i do yes, it goes back to idleanimation and boatmovement when isAttacking is false
Is that condition ever being met?
basing from how i see that the animations do indeed change basing on my inputs the way i intend them, yes
ok for some reason, whenever i add a new animation state that is not the idleanimation or boatmovement (even if this state has no transitions with the idle and movement states), my gameobject just cannot move
Hi Pinball kitty
I'm having some really weird interpolations when I try and blend clips
Especially if I use the clip transform offsets
I thought the transforms were just a way to place the clips in world space, but when I blend the clips it also interpolates the offests!
does anybody have an idea on how i can make the blue guys (and the red guy) move smoothly
Move the sprite to the object's "real" position with a delay, using some smoothing method like Lerp, MoveTowards or SmoothDamp
Getting some very bizarre behavior trying to set a parameter in my animator
Anim.SetFloat("LifeTime", Time.time - m_SpawnTimestamp / Lifetime);
Lifetime is the length of time in seconds that the object will last, m_SpawnTimestamp is the Time.time value on enable
this should return a value between 0 and 1 that represents the position in the object's lifetime
debugging my code verifies that my math checks out
but the parameter is being set to an unexpected value, it seemingly starts at 2.0f and climbs up in seconds from there
every time a new object is enabled, it continues from this point
next one started even higher
it's almost like instead of setting the float, it's adding the value or something
and... its an order of operations error
i'll just see myself out
Does anyone know how I can make it so that the foot curves, and doesn't go inside the stairs? I don't know if this is a good channel for this, but i see it most-related. (Im a beginner in unity)
(yes it is a unity template)
Generally you'll use a raycast from above each foot towards the ground to get the intersection point, and then use IK to place the foot there.
no comment
Hey, I have this 2D bone rig set up for a 4 legged spider thing with IK animation & limb solvers, and I wanted to figure out a way to make it so the body moves as the limbs move (the player will be controlling the positions of the individual legs). Does anyone have any tips on how to approach this?
Update: I think I have an idea of how to do this, hopefully it works
You can use animation layers, blend trees and sub-state machines to make animator state machines simpler and more logical
Well, it depends on what kind of movement you want. You could simply move towards the center of all limbs, or a weighted average, or could do some basic 'balance' simulation.
I'd have some comments. 
Okay please help me this is driving me insane after 5 hours
So I have a script that updates the bone rotations
And it was jittering while the player was moving because it was clashing with the animation I guess
I just found a fix by changing the call from lateupdate to fixedupdate and setting the animator to update physics
But here's the thing
The script won't work unless I hit play and manually go into the editor to change the animator mode from normal to update physics
And the same thing happens if I start from update physics and change it to normal in playmode
Just changing it in the inspector out of play mode makes the script not work
💀
Is that really a fix or are you just breaking it in new and exciting ways?
It stopped jittering so I consider this 100% a fix
At least compared to the past 5 days of tinkering
Oh and if I change the update mode back to the original it stops working again
Half considering switching the update mode by code at runtime to see if that works
I am wondering just why you're having the problem in the first place; you really didn't give enough detail to tell
So I used the unitychan spring bone scripts to animate my character's hair
In that there's a method that updates the rotations in the bones
Right.
That got called in the lastupdate method of the springmanager script
Right, to avoid conflicting with the animator.
How are you handling the motion that causes the problem?
But it started jittering real bad so I looked for fixes online, and couldn't find any
Then it started working after the stuff I said before
I've animated the rig and bones in blender and imported them into unity
That shouldn't cause problems, usually.
Like I can't even make this up
The same thing happens when you set it to animate physics in the editor before playmode and switch it to normal
Also I changed the lastupdate to fixedupdate to fix the jittering problems, with the result being what you see above
I mean, I literally can't tell what is incorrect in that video
You almost never want animation on fixedupdate
Very very rarely
Well it does have physics calculations involving deltatime and it fixed the jittering
When the update mode is set to updatephysics you can tell that the feathers on the hat are affected by the script
The problem is that just changing the mode to updatephysics in the inspector out of playmode does nothing
You have to manually change it while the thing is playing on either mode to see the script active
Animatephysics*
You only want animate physics when you're wanting the animation to affect the physics system
You seem to be fixated on 'how do I make this approach work' rather than 'is this the right approach.'
This seems to be the only approach that works after days of scouring the internet and asking questions so
Plus you can clearly see it working in the video
I can't tell what I'm looking at in the video, honestly.
What is right and what is not right.
What kind of movement script are you using?
For the player?
Right now I have a rigidbody.moveposition in the fixedupdate method
And what happens if you just manually move the character's transform around?
In playmode the springbones work mostly as intended
Even before the fixedupdate fix
And if you disable the animator?
Spring bones jitter with the movement script
They use time.deltatime in their calculations, I'm pretty sure using fixedupdate was the right call
The problem is how I can get the script to override the animation, or just if unity is bugged for me
If changing the update mode in playtime to a different value doesn't somehow affect the animation being before or after the script, my unity's probably bugged
Maybe disable write defaults
if the feather bones arent being animated that animator will try to keep them at the position it started with
Atleast from what i understand
Checked my animator before and it did have keyframes where I didn't animate the bones, so that could be right
correct
Sorry to hear
You should definitely remove keyframes on any bones you want to use the wscript on though.
iirc the docs for unitychan said so(albeit in japanese)
I did remove it in blender, I'll have to remove it in unity too
Should have watched anime when my friends recommended it to me 😔
Still doesn't work lmao
I dunno. I didn't use that version of springbones much but I didn't have any similar problems
Okay this is messed up
Remembered update mode has three options
So apparently the cycle goes from script works > script doesn't work > script works >script doesn't work
Each time you choose a different update mode
regardless of the mode chosen
Should I just reinstall at this point
My guess is that the choice doesn't matter but that changing the inspector is restarting/tripping something in the script or animator's execution

You'd probably want to ensure the spring bone to move the transforms after the animator, both in LateUpdate
Or in some other way make sure they don't try to move the same bones at all, since only the spring bone should be responsible for the motion of the hat transforms
this is what i do in chase mode
Okay setting root motion to on or off does the same thing
Found a fix to my fix based on what you said
Just stored the calculated rotation from fixedupdate in a variable and changed the rotation to that in lateupdate
There's probably a better way but I'm content
ok I lost you at intersection point and IK
Genuinely curious why the playmode settings interact with the script like that though
If scripts are execution order-dependent but have no set execution order, their order will be effectively random
Not just in editor but also when building the executable
Yes. This is what is called a 'race condition,' if you wanna google it.
Because the behavior depends on what happens to execute first.
My guess is that changing editor values in the animator is restarting a process and changing the order the execution happens in.
Why would it switch back and forth upon changing values though, that's wierd
Well anyways thanks for the help 🙏
That's hard to guess without running some tests.
any suggestion to make a better jumping effect?
It seems like you described how to improve it already
You can use a mathematical curve to link the speed to, or a curve field that's editable in the inspector
Animators often use "root motion" to link the animation to keyframes when authoring the animations
thank you very much, this is what im trying to make
Heyo, I got a 3D character on my map with first person and third person view and enhanced Movement/jump/run script. I included a Idle state animation attached to entry state so my player enters the game in Idle state (still standing breathing animation) Now I want to Include more Animations like walk forward, left, back, right, run and jump. they should only be active when pressing each button: W, A, S, D, W+LeftShift, Space. I also want a very short transition between my allready imported animations. Can someone tell me the easiest way to get this done?
how to make root motion loop in generic rig?
i have slove it, thanks
Hi there, I have a bit of a long question. So I've made and rigged a character in blender and I want to import it into unity. I have some animations where it can walk and run. But I want to add the ability to swing a tool as well. Now would I have to make another two animations for (swinging + running) and (swinging + walking) or is there a way to "combine" animations or do something in unity where the player can do both. It would be a bit of a pain to have animations such as eating and stood still, eating and walking, eating and running. I know I've made a mess of this question but if anyone knows at all what I'm asking please help 🙂
You can have animation layers which can be blended between, using avatar masks to limit them to body parts.
I'll look into that thanks!
I have some animations running good, and there are 2 animations that makes animation freeze. I'm suspecting it is happening becouse they are too short. Transition at the start and end of these animations when summed up longer than the animation it self. Is there a way to make work like this without making animation longer? And do you know as a fact what I suspect is a thing?
Weird thing is, it doesn't happen consistently.
The obvious solution sounds like to make the transitions shorter
I've had some animation transitions break randomly with animations that are one or two keyframes in length, but there really wasn't a reason to have them that short
Thanks for the answer! I tried lowering transition down to be sure and I guess it was't that it keeps happening. The clips are 9-10 frames long but played in double speed.
I guess rather than transition it is more about short animation clips, and when I pressure it with quick changes it freezes. Slowing time or making animations longer solves the issue.
Just loop the animations to confuse the player
You can edit the transitions to have basically no overlap, which preserves the full animation in exchange for making the transition a bit more janky
Is it possible to activate random transition from a given state without using code?
@hallow yarrow I slowed the animations a bit which solved the issue, I think I will redo them a little longer. But great suggestions thanks!
I think Any State is what you want. https://docs.unity3d.com/Manual/class-State.html
Nah it looks like it doesn't pick random transitions, it's playing the same transition all the time
Transition to what?
But yeah coding it should be way easier
Transition to anything, e.g. another state. If A connects to B and A connects to C, and both B and C connect back to A, animator would pick one option (e.g. A -> B -> A) and repeat it over and over again
What do you mean by 'without code'? Animators are only controlled via code.
Unless you want it to just follow a pattern.
The usual way to have a random choice of transition would be to use an integer parameter in the animator that you set randomly every time a transition is done
I'd say that it would make sense if you had transitions like A->B and A->C without a condition, then you'd sometimes have it transition to B and sometimes to C, yet it only picks one transition and follows a pattern.
It will always pick the first transition that satisfies the conditions.
hello
lets say i want to make animation like walk,run, basic attack for my model
its better to make it in blender or unity?
sorry for noob question,
All 3D character animation should be done in Blender
If it's not 3D or not a character with multiple bones, you might get by doing it in Unity
That's the rule of thumb, but there's no exact criteria
Unity is almost a passable animation tool, compared to Blender being a fully fledged suite of animation tools
Unity's upside is that you don't have to deal with importing and you can animate properties not recognized by Blender
Such as components
Either.
how do i create an avatar component for the character?
Having an issue where my character reverts to it’s original position. Editing the keyframes is not working
nice map
I remembered my Animation Event window's function selection being much nicer before. Was it changed in an update, or am I just forgetting how to use it properly? My functions for this object show up in this giant, ugly list that isnt sorted or even scrollable.
Animation keyframes are property overrides, meaning any change you do in editor will be written over by the animation.
Transform component properties are relative to parent gameobject.
So, give the character a parent gameobject to allow animations move it relative to that parent transform.
That makes sense, thanks! In the end, I started a completely new project as a test and it worked there. Go figure
I can assure this is not some quirk of your scene, but the fundamental way animators and transforms work ^^
Basically always when you have an animated character that should be able to move and animate, it should be under a parent gameobject
Animation events look for every public method of every component on the gameobject
You see this big list with UI components
You can kind of scroll by clicking on the arrow that should be at the bottom of the list, but here it seems to be cut off
I don't know what the correct workflow to deal with this is in this case, but from what I hear the Animator might not be the best fit for UI components in many ways
At least what I used to hear a lot about was that UI should always move with something like DoTween rather than animation
Morning guys and gals. Quick question for you. My character model came with a "choose your head / hair" feature and because they came separately the head isn't included in animations.
Is there an easy way to "bake" the head back into the model so its part of the animations?
Roll dice. Try to roll two sixes!
You can find more: https://lenadesign.org/2020/06/18/roll-the-dice/
To see the animation on the website: https://www.lenastanley.com/2020/06/roll-dice.html
Follow me:
Twitter: https://twitter.com/lenasta92579651
Instagram: https://www.instagram.com/stanleylenablog/
Found this video helpful and want to buy me a...
anyone knows how i can achieve this in unity
Hello! I would like to update my character fbx in unity with an updated version. The update only contains a few more animations. How do I update that while keeping the changes made to the asset in Unity?
Generally, updates shouldn't remove your changes unless you altered the hierarchy or inserted animations earlier on the timeline than the original ones- changes made in unity are stored in a separate file. However, if you want to be sure then you can just export the animations separately and merge them in unity by proper naming.
Which will leave the original file untouched but with the additional animations added in.
Hi i want my rootmotion animation drive my navmesh when on offmesh link: for example jumping down in an arc given by rootmotion instead of straight line down by the link. Any idea how to do that. I added a behaviour to the animation and changed the navmesh position to the rootposition of the animation but this does not help
Thanks
I'm making a tablet in my game that the player holds up to their face to use (very important because they will use this a lot), and I'm wondering how to do animations for that, do I only animate the players arms and just summon objects into their hands? and then like every single object the player can hold has its own animation that shows the player holding them? or is there something better I can do? like what is a good structure for a game like this where I need multiple holding animations
and there will be lots of different sized items the player can hold, meaning there needs to be animations for each item, and then there is a generalized animation for idly moving their arm around while holding the item
Oh is that so? I had planned to use it for a DOOM style game, and I figured the best way to represent the player's weapons would be canvas elements since they are just 2d sprites. I'll have to check out DoTween, maybe that will solve it. Right now I've finagled it together by passing the FireWeapon() function through my player controller Instance, reading it on the weapon through a WeaponAttackHandler script.
UI images and sprites are 100% different things technically
Oh what I meant to say was that I have a spriteRenderer attached to a gameobject in the canvas, sorry.
Or wait, nevermind, haha!
They cannot be combined either
Only UI components should be in a Canvas hierarchy
It's an Image. Oops.
So in this situation, DoTween is probably where I want to go toward?
And then I'm switching out the Images manually through code? Really all the "animations" are anyway is moving the hands up/down and then switching the image when the player is 'casting' a spell, to a new hand image, ie:
Swapping the images shouldn't be a problem
For moving or resizing them I used to hear almost dogmatically a couple of years ago that DoTween is the way to go, though the systems haven't changed since I haven't really looked into if that's true or not
Since there aren't all that many components and the canvases are separated, I doubt you'll run into issues either way
The benefit of canvases is that they can adapt to different screen sizes and resolutions, and there's many ways for users to interact with them
Whether I'd use Images or Sprites for doom-style viewmodels kinda depends on how much they need to be animated, and how precisely they need to be positioned relative to screen
As I understand Sprites would be less messy and more performant to animate, but don't have the kind of anchoring or scaling options
Swapping the images is quite simple, you're right. I did plan on animating the hands, though, so maybe I do need to approach this differently. There's supposed to be a tome in the right hand for example, and the final animation of the left shows some scorching when fired. This loss of dynamic scaling and anchoring is kind of troublesome though. I'd basically be writing my own scaling algorithm?
https://gyazo.com/736867b4b40333ebbac4609520ae0cc8 just for an idea of how it looks now
Probably not
It's likely you won't run into issues
But if you do just consider that for this purpose there are multiple options with drawbacks and quirks to each of them
3D geometry instead of sprites can also be a desirable choice in some sitatuations, as well as overlay cameras
But, my intent is not to lead you to overcomplicate unnecessarily
One quirk you faced is the public methods crowding up the event's list
The main cost of animated UI is that a canvas will need to be rendered again when an element within it is changed, since it's procedural geometry
I'm not sure why DoTween would be better at this but allegedly it might be
Still, it might take a lot of elements in a canvas before you start experiencing slowdowns
Well this is all very good info. I think I'll stick with trying to animate the canvas until I run into some crippling issue only DoTween can solve. As of right now things seem to be going generally smoothly, with the exception of the public method quirk you mentioned, but since I'm only ever going to be calling a single method (Fire()) from the bottom of the list, I think I will be okay. I actually forgot about having to redraw the canvas on change, but like you said, with what I'm trying to do here I can't possibly imagine that becoming a bottleneck anytime soon!
This has cleared up a lot for me, thank you Spazi.
Hope I was coherent enough 
Totally! You are one of the only people who I read the answers of to other people's questions, haha. I'm always getting little info nuggets from you. Really appreciate what you do!
You could go that route, or you could animate the arms procedurally- define grab points for each hand on each object, and use IK to keep the hands in place while you just animate the movement of the object.
idk what route you mean lol, i suggested a few routes, what im thinking is each item has a version with a hand attached and I just move the hand around to make the player seem to hold the item, I wanna make items fairly straightforward to add, and then how would I attach my hand to my arm?
Well, if the hand/arms are a mecanim humanoid, the built in IK is plenty for that probably.
what in the world is a mecanim humanoid
also I dont know what you mean by "the built in IK is plenty for that probably"
does anyone know if these blender export settings are wrong for a non human animation? Or is sth wrong with my unity settings when i import it (animation type: generic and the right avatar not more)
Sorry if this is the wrong channel, But I am making a skateboard game based around hawk pro skater. And I am wondering what character controller should I use. SHould I use built in character controller to have them go down a slope, or should I use rigidbody to work with the physics?
Hey how can I detect where the player is moving then applying that animation to it like straight left back right , strafe for example
oh okok thank you
Basically, you can just move the prop around and the hands will follow it.
Much easier than trying to set up arm animations for every single prop
oh shit really
even with like finger grabbing it?
You'll probably want to use an animation clip or script to pose the fingers. The built-in IK only handles the hands. You could also use the animation rigging package to set up per finger IK, but that is overkill 99% of the time.
thats what I was saying earlier, just instead of the whole hand its just fingers
I havent done a whole lot of animation, does it let you preview where the hand would go for each object? and then should I just create a different hand animation state for each object? or something like that
I really have no clue how to approach this, there might also be lots of animations for using the items, so I want it to be very simple to add new stuff
I guess it depends on hos specific the hand animation needs to be; a lot- of not most- games get by with very little individual finger animation. You're really the only one who can judge what is worth it.
if I wanted to, what would be a good architecture to have a per-item hand animation for holding the item?
do you know?
Dunno. Too many variables.
There's no simple solution for such a complex situation. Just areas to look for optimization.
Step one is looking carefully to see what you actually need, I'd say. And working from there.
Most likely, you'll only need custom animation for a few props and can use something like this for the rest https://assetstore.unity.com/packages/3d/animations/hand-poses-206705
But if you actually need the hands manipulating objects, there's probably gonna be a lot more manual work involved.
sure, im just thinking ahead a bit because im curious and i really wanna have a good framework for my whole game so i dont have to deal with a PITA situation (ive had this problem before, which is why im scared of it lol)
hello guys I m new here 🤓 . I try to us my 3d caractere that a made whit a mixamo animation and it don't work. Have you an idea to fix it ?
You'll need to give more information about what you're doing and what isn't working.
Hey! Anyone can help me how can I fix this? Make the camera. position = with the head's?
Is the camera a child of the head?
The camera is a child of the player not the head exactly
But If I do that, thats just worse
Well, it is a bad idea but it is also what you asked for. 😛
You could also just use a script to closely follow the head without the rotation
Well I just want not to see my eyeballs when jumping 😄
well, how can I achieve that?
Does someone knows how to improve the loop time(red arrow) without moving the last sprite(blue cercle) ? So it doesn't do a weird come back when the loop is finished
Just add another keyframe?
https://www.youtube.com/watch?v=9H0aJhKSlEQ I followed this tutorial and it didn't work. do you have any thoughts on this?
Animate a character with Mixamo
Check #SyntyStudios for more videos
Subscribe to Synty Studios on YouTube - http://bit.ly/2YPlWRp
Like Synty Studios on Facebook - https://www.facebook.com/syntystudios/
Check out all the different content available on the Synty Store - https://syntystore.com
Files required: https://www.dropbox.com/s/lyc53bvsohi...
I dont know how did I did this added an event I guess but how can I remove /fix this?
I have this animated character and a static chain/pendant; how do I get good movement from the chain and not have the shirt clip through?
how do I line my gun sights up with the camera?
https://www.youtube.com/watch?v=iOB9ru6bF9Q
First clip is what I'm trying to emulate, second clip is my first attempt, by putting a jpg on the hud, the main point of this is to practice getting the right sight picture. third clip is my current version of the project.
There's so many ways of doing it I can't really think of where to start. Do I have to start learning inverse kinematics, 2nd camera, culling masks and clipping planes?
My first attempt before this one (scrapped) was this:
https://github.com/zibbazabba905/HuntStyleAimTrainer/blob/main/Assets/Scripts/Player/PlayerWeaponHandler.cs
And is very "this could be done easier"
hello I am pretty new to animations so i need help with the walking transition from idle sorry for any bother
yeah also me
How do I get the trigger to right part so i can use the transitions?
It automatically appeared there last time I did it for another animation
You also need more than one state to be able to transition from somewhere to somewhere
https://youtu.be/sgHicuJAu3g this tutorial should have everything
May somebody help me fix my animation cant figure out whats wrong
Hi! I recently bought a medieval characters pack from the Unity Asset Store and I would like to know how can I make fpp animations for them. Like, what is the complete workflow, should I use Blender? How should I import then? Should I use IK Rig? etc. Thanks! ❤️
https://cdn.discordapp.com/attachments/497874004401586176/1097603643802402827/image.png how do i fix this i tried adding a character i found and it looks good i want it as the character when i spawn in but when i click like to change avatar it dosent pop up
I'm trying to make an animation for an elevator opening in 2D. Basically the transitions in the animator are working logically but the game object just disappears as soon as the animation starts? Any ideas why that would happen? I can provide more specific info if needed
I'm getting a warning "Animator is not playing an AnimationController" but I have animation controllers everywhere I need them and the object that the animator is on is always active so I'm not sure why this would be happening
Define 'disappears.' The game object is removed? The game object teleports back to the origin or some other unexpected place? The object's sprite renderer is disabled?
I fixed the issue thank you
im trying to get head and chest IK working in combination with my movement script but it doesn't seem to be working... I'm not super familiar with IK but this is pretty basic and I don't see any reason it would be breaking
the red effector is the 'Head Target'
Im having a problem with my dash animation. When I jump, let the fall animation play and dash, the PlayerDash animation starts and ends properly. When I jump and dash immediately or a little after my jump it will just keep playing the fall animation. Maybe it's a simple fix but I can't see it for whatever reason. Any help is welcomed and if I need to be more specific I can. Thank you
Are you trying to transition while already in a transition?
Hello, I am trying to call function using the event in animation. But the function is present in the objects parent script. How can i pass the function now?
Thank you so much, I really appreciate it. Not only was that helpful for this sitiuation but will come in handy for further projects and other assets that will be added ✨
I want to do a simple animation logic like this via the animator, now is it possible to make each step have a poll of different animations of that same type to get drawn randomly?
Like if the Idle has a list of Idle0...IdleN and when its played randomly select 1 of them
hey?
Yes.
Oh yeah substates! That is what I was looking for! Thanks
Sorry I need to know just a couple of more things since I'm using substate for the first time:
- Entry is the IN and Exit is the OUT?
- Is there a way to randomly pick one animation between the ones I have without having to make a script?
Yes to the first thing, but what you actually want to do is transition to the (Up) state- Exit connects back to entry without leaving the substate unless you have a transition from the substate already established. The second is 'technically yes but not really' because what you are actually doing is using a variable to choose which to transition to. So any method of setting that would be fine but a script is by far the simplest.
Hey! I am having a little trouble with a sime door animation. I have 2 anims, Open and close. When I add the anims to the animator the entry node auto connects and can't seem to add a parameter to that entry node transition. Do I need to have a 3rd anim that will just be the base of the animation ?
Idk if it's the FBX exporter from Blender, or how Unity imports models, but something is pissing me off. It's so inconsistent. I have 4 animations in my Blender file. base (a pose), idle, walk_fw, run_fw. Sometimes, it exports the walk and run just fine and moving over to Unity has no problems. the base animation is always missing, never imports, idle only imports with a random amount of bones deforming to the animation as expected, and weights are randomly messed up upon import. However, sometimes, the fingers export uncurled as well. I never change the settings in my FBX exporter, it's always the same. But the results are ALWAYS different, I seriously don't understand what's going on. Hoping I can get some help here. Attached are some examples.
Hello, I'd like some help with animation states. When making state transitions, is there anyway I can create my own state block similar to 'Any state', that only covers a few, specific listed states, or is that not possible?
Not in the UI. Possibly possible through scripting but that's a very 'maybe' sorta thing.
You can just have an empty state.
I'm having an issue with my attack animation. It seems to be in a different position than the other animations that I have playing but I can't figure out why. Is there away to transform the position of the attack animation only to align with the other animations? Or may I say, 2D Collider? I've been trying to figure it out and do research but I can't find anything on it. Help is appreciated
is there a way to restructure an object's hierarchy without breaking the animation?
Hello, does anyone know why i keep getting this error when i open the blendtree
BlendTreeWorkspace is NULL
UnityEngine.GUIUtility:ProcessEvent (int,intptr,bool&)
I have a sub-state with this structure, I use "Empty" state too check what idle do but even if that state has no animation and no exit time the character returns for few frames in T pose, is there a way to avoid that?
An I can't delete Empty and directly link all the idles to Entry
This is the base levele animator
Remove transition duration?
Not working, because Intro -> Idle has transition (and it should have) but since the first animation inside Idle is a Tpose it transitions that
While I should basically go from Intro to one of the idles I made
Maybe plan B could be to use a blend tree instead of having the separate and just an int to precisely pick 1 of them
This seems working even if feels a bit too overkill
Now is it possible to call a Method when the animator enters or exit an animation with having to use animation events in each animation?
Yes; that is what state behavior scripts are for
yeye just discovered them this is a basic code I'm making, is it possible to directly select a parameter instead of having to write a string with its name?
Please look into "blend trees"
Also is there some form of override called "OnLoop"?
I want to randomly decide if staying in a state for another loop or exit
I've already made the logic but need an event to trigger that
{
//Trigger to exit animation
animator.SetTrigger(triggerParameter);
}
else
{
//Animation will loop as default
}```
but for that I should use an OnUpdate right?
Probably
mhh would prefer to avoid that
one last question: is it possible to set the amount of loops via code? In this way I can just call it once with OnEnter and tell to randomly animate that loop for N times
maybe with the normalized exit time but dunno how to reach that parameter from inside the code
I assume you might want a transition back to the state itself for the loop, while an int condition tracking loops is above 0, with exit time so the transition would happen at the end
Let me explain, inside this substate after the loop idle ends I want to randomly choose if re-doing that idle or if doing first an action and then return to the loop.
For that I'm now using an empty state where it only contains a behviour script of activating 1 of the 2 triggers but I get issues with the animation itself since the empty is in between it doesnt smooth the 2
So I either need to write some logic directly in the Idle Loop to let it exit the loop after N cycle w/o having to use Evaluate or solve the animation transition issue I get when using an empty state
So, how about my idea of a transition back to itself instead?
I can't track how many loop it does with the behaviours
Since it only trigger OnStart but when looping it doesnt get called again
I would need some sort of OnLoop that doesnt exists
Otherwise I could have just get random a number of loops and after each one check if I've reached the limit to then move into the other animation
My first option would be to have an animation event at the start of the clip
Technically I cant since that Idle Loop its a blend tree that picks up a random idle between several
I should make an animation even in each of these but seems way overkill
there should be a way to achieve what I want in a simplier way...
https://docs.unity3d.com/ScriptReference/StateMachineBehaviour.OnStateEnter.html This could be another option
But also I might consider using discrete states instead of a blend tree here
Might be a way to make it work with Any State, as really any state should be able to transition to any state within the sub state machine
Tbh a type of state with multiple listed motions just for this kind of purpose should be built in
Or maybe it should be just easier to create transitions
I already use that but as I said an animation looping does not re-enter that state
Well, maybe you could read the state's normalized time to subtract a loop from the counter whenever it's less than 0.5, and not subtract again until it's been over 0.5
A bit hacky
Sure it's not better to use separate states?
I am making a fighting game in Unity 2020.1.4f1. In the animator window for Character1 I have two layers, Base Layer and Flip. Flip is used when Character1 is facing left and Base Layer is used when facing right. However, when the Flip layer is used, Base Layer is playing at the same time. This is not something I want. When the Flip Layer is playing the Base Layer is turned off. How do I fix this ?
Are the flipped animations unique, or just the same animation + sprite renderer flipX or similar?
They are the same animations, just flipped
The flipped animations are they're own animation files
Is that necessary?
You could skip this hassle if you can get by just toggling the FlipX property
Where do I toggle the FlipX property?
Sprite Renderer component, assuming you're using that
No, I am not using that. This is a 3D project btw
I see
Still you might be able to do something similar by inverting the scale of the character, though be wary that this may mess up scale-reliant components like colliders, potentially
If that's not a desirable option, I would go back to the initial plan and use a "synced" override animation layer
The base layer will always play, but this should not be an issue if the synced layer has a mirrored motion for every state
It´s an issue because I have hitboxes for the arms and legs when a character punches or kicks. If my character is using the Flip layer and Base layer, then two hitboxes will turn on. I don´t really want that.
I want it so when the Flip Layer is turned on, the base layer will turn off.
Layers cannot be "turned off", though they will be overridden by layers on top by weight
So a weight 0 layer is probably as off as you can get, though the state machine will still be working
Alright, I will try to use weight to fix this. Thanks for your help!
In this case specifically the override layer should be specifically disabling the base layer's hitboxes
For this it's important that it's a synced layer
Why can't I access the inspector panel like in this video, mine does not contain features like exit time and conditions? Is it a version difference?
I hope someone could help me get an answer, have a great day thank u
What does your inspector window look like when you select a transition between states?
It looks the same as in the image but does not contain anything below the 'has exit time' but an option to add behavior to it
It's always easier if you can show a screenshot of the problem part
Based on this description it sounds like the "Settings" field is minimized from the little arrow that precedes it
How can I maximize it?
The little arrow, click it
Wait lemme see
Is it ok if I send a picture? I can't take a screen shot because I am using my phone rn
Anything you can provide could be helpful
Sure thanks, just a sec
Yes here
The transition is not selected here, rather the state is
A common stumbling block
Thank u, I am new like only 20 days into unity, my bad and thank u :>
Cheers and have a beautiful day ahead
Anyone have any ideas?
There is no built in way.
Maybe you need more context but i try... why can't i edit the rotation of the UpperLeg_R?
It is normal for a state machine to look like this?
Normal in the sense that it's a very common mistake not to utilize animation layers, blend trees and sub-state machines to cut down excess transitions
The labels are too small to see so I can't give any suggestions where to optimize states using those techniques
Anyone here an expert on root motion? When I have root motion disabled, as expected the root of my character does not move. But when I enable root motion, the root moves forward and the animation movement plays on top of that, so while the root position is correct at the end, the mesh has moved twice the distance.
Does anyone know how to resolve this?
Is there a definitive way to sync animations in humanoid animations? As an example we have a running bounce ball animation. We have a bone in the animation specifically for the ball movement. This works if the animation is setup as Generic. However, when humanoid the ball bone is not mapped and therefore it does not have any movement.
I have tried other approaches, such as creating an animation specifically for the ball and triggering it with an animation event at the correct frame, but this has an issue where it is not always synced. The animation event isn't guaranteed to be frame perfect so sometimes the ball animation is triggered a frame or 2 behind the character animation.
I feel like I am missing a very obvious solution, it seems like a very common problem but being unable to pull extra bone animation from a humanoid animation seems like a big restriction.
How is this approached?
hi, I am trying to make a simple thing work, using an Animator on a humanoid avatar and playing an animation in a loop. But the animation plays once, then freezes. I have a condition setup on the transition to stop it from going to the next animation, but it doesnt loop, just frozen. I do have "Loop Time" checked off on the animation and also tried "Loop Pose" as well. What am I missing?
It is normal for people's first state machine to look like that anyway 😄
You have a humanoid rig so you can't directly animate the transforms.
enabling root motion won't remove motion from other sources like scripts.
You can add additional bones to a humanoid animation in the importer.
does single bone eat much more performance than single vertex?
they all are 3dvectors?
in blender you can use low poly cage instead of armature for better deformations, is it ok to build same shape armature with constraints that will imitate low poly cage and then use it in unity?
or it will eat too much?
it will be 5-6 times more bones and i will bake all animations, no constraints in unity
How? At best I can see it being added as a bone that isn't being used (Toe for example) but can't add an additional bone
And that doesn't seem to work either'
In the importer, under the avatar mask there are humanoid bones and also additional transforms- you need to explicitly add them to the avatar.
I don't have a clue where you mean, is it possible to share a screenshot?
I don't have unity open at the moment
Guys how can I make this slider or whatever it is. I think this is a linerenderer.
Any idea?
Hi, anyone encountered animation curve value error when changing animations through animation override controller? As soon as I change animations the default parameter value changes somehow now when running animations instead of it being 0, the other animations seems to work fine, only going to 0 is now changed to random value between 0 and current clip value that played when the change took place.
So haven't found any info on it but by trial and error found this, unchecking Write Defaults on animator state seems to so far fix the problem.
hi, I am stuck. I have a humanoid animation that I am trying to add an event to. But in the Animation window, its read-only. I've tried duplicating it, but it's still read-only. Any ideas?
if I expand the FBX, and locate just the motion clip, and CTRL-D just that clip, it creates a clip that is no longer read-only. But I dont want that, I dont want to divorce my animation clip from the rest of the FBX.
What causes it is that 'write defaults' writes a default value for all curves for animations that don't have it.
Add the event in the importer panel.
Yea I thought it would just do that, that is reason why I added empty animation curve so there would be data and won't be rewritten, but seems it still rewrote the data even when there was a curve there. So for now it will stay disabled until I come to the point of needing it.
How do i make the base move with the character it stays still in the world when the character is moving in animation?
Root motion
Do you know how to make root motion with a character that cannot be converted to humanoid?
A character that dont have bones like a regular character for exaple a horse?
You just tell it what the root node is
Oh ok thank you i just tested the root motion and it worked 🙂
Rendering 3D models as 2D sprites for my top down project. How should I go about doing it? I have worked with pixel art Sprite sheets before. Should I:
-
Render out 24 individual frames for each animation and assemble a Sprite sheet
-
Render out a few frames of the animation like in a pixel art Sprite sheet where there’s usually only 6 sprites for a walking animation
-
render it in an animated/video format (if so, which one?)
Howdy fellas, quick question, why dont my objects transform rotation and its constraint rotation at rest match? The armature is in its rest position so why is it different?
Quick question, Is there a way to export an animation from Unity to other softwares?
UE5? Blender?
Just rephrasing
Away from Unity, and not to unity
Hi peeps! I need help with this weird looking hand
This is a FPS hand and I am trying to move the hands so it lines perfectly with the trigger of the gun. The hands are lined up with the previous "Body" of the other gun, and I can't seem to move the hands at all, only the gun. Is there a way to fix this? I am using the "Easy FPS" asset and I added another gun, the AK for use instead. Cheers!
hi, I have an animation of a character doing a pushup, and want to make it look like they are struggling sometimes. I wrote a simple script to add some noise to the rotation and positions over time, but it looks bad because the whole body is bouncing including the feet. How can I programmatically add rotation and movement to individual bones or bone trees? The positions of the bones seem locked, so I'm only able to programmatically change the root game object
Hello friends, does anyone know why an animation is working in the Preview but isn't working in the game?
Working in the bottom right, but not working in game
Is this for only 3d animation, or 2d aswell?
Alright guys. I may have only 1 year of unity under my belt but i like to think i can figure stuff out. Well apparently not this.
So, this is called in-place, yes?
and this is root motion?
well then what is this?
Define 'isn't working'?
Is what for 3d animation?
That is incorrectly set up root motion, looks like.
That is, the animation is designed for root motion but it might have the wrong root node selected or some other incorrect setting.
does anyone know any tools to help create simple animations very quickly that anyone can personally recommend? im looking to make some quickly without doing it by hand
Pinballkitty has it right. Through space, no root motion. This kind of animation is not very useful for locomotion and it will leave the parent object behind while your character animates, then snap back each loop.
FBX exporter might be able to do it, but usually you always want to go from source files to game engines, not the other way around
I tried, apparently only the hips translation and rotation transferes
I wish to apply that animation on blender on a render
I checked the exported fbx and the animation wasn’t correcting being exported, both ue5 and blender
Hola everyone, I am trying to get my enemy model to play the idle animation, I assigned it the animator as well as the idle animation but it still is not playing the animation, I was hoping if someone could help me out with this
what app should i use to crate animations
please don't crosspost
your question is too vague, there are so many different animation techniques
so respond me
I can't give a precise answer if you don't tell what your precise needs and goals are
A quick google will give you a general list of animation applications just as well
I'm working with the Animation Rigging Override transform constraint and why is there no concept of a World Space Pivot 😔
I want the functionality of pivot, but added to the constrained objects world transform values.
Because it was designed by programmers, not animators.
It is hard to tell what is wrong without more info. Is the animator running? Is it showing the correct state?
You need to include the entire hierarchy, not just thr root transform.
Unity has built in animation tools for simple stuff.
Well, if they feed the correct transform on as the root node, it should still be usable. The problem is probably in the import settings and not the data.
was just wondering if theres a tool thats downloadable somewhere or one specifically thats better/quicker to use thats a paid tool, the built in one is fine and all but was interested if anyone has any other alternatives that are better

So you can specify per animation which bone is the root node? I suppose you wouldn't want to be mix and matching
Does that work if you're using an avatar?
What setting of the exporter is it?
If you are using a generic. If you are using a humanoid avatar, then it should be extracting the correct motion from the character anyway.
You have skinned meshes disabled, so it'll ignore skinned mesh animation
How would you set up the fbx exporter then?
I am sorry if it is too much to ask, just feel it is not being extremely obvious. 😢
how do i render an animation i made on unity?
I need an animation tool to create detailed sprites
for a 2d game
Better ask at 2D tools chat
Better to ask in one relevant channel at a time so people don't waste time prying for necessary details in multiple channels at once
how do i amke sure that my animations dont start playing before the scene has finished loading and the player can see it ?
My first idea would be to enable the Animator and other relevant behavior with this event
https://docs.unity3d.com/ScriptReference/SceneManagement.SceneManager-sceneLoaded.html
thank you
I feel like this applies to the way most tools have been designed in the engine
Well, there are some counter examples. Like shuriken.
Fair, I think being a relatively new user it did strike me that the engine is very programmer centric, particularly animation wise.
I'm trying to rig a 2d character for use with the bones animation system, but my character is split up into multiple pieces contained in separate images (Head, Arms, Torso, etc). Tutorials appear to mainly keep them all in one big file, I was hoping to keep them separated like this as I want to be able to swap out parts (Different weapon in the hand, for example.) Is this possible?
So i really need help with my animation and why its not stopping https://hatebin.com/ihfebsvmcq
im really dumb
Why would it stop? There's only one state whereas walking and standing would be two separate states
In my code i write that it has to stop :( https://cdn.discordapp.com/emojis/504985247520129036.webp?size=64
how should i set it up that it stops :I
How?
Flipping the bool parameter won't do anything if it's not used as a condition for anything
how could i do that
https://youtu.be/sgHicuJAu3g?t=1174 This tutorial explains all the basics, and timelink explains parameters and conditions
thank you
Also, is it even possible to use both Keyframes and Bones in the same animation for a 2d sprite?
Yes.
Yes, "keyframes" refer to all kinds of data points on the animation clip when the animator will override a component property
Bones are transforms and their positions are properties
Sprite references likewise are properties in the same way
Or rather... keyframes can be set both for the sprite property and for bones.
Sorry, by keyframes I meant like, swapping the sprite out at a certain frame
like if you imagine a run cycle, could I combine the bone moving with swapping out the sprite itself at certain points
With the "any state" node in the animator, can that take me to a different substate machine, or does it only stay within the current one?
That is what I thought. And yes, you can. Though Unity suggests using the sprite resolver.
Can you rephrase?
Generally speaking any state 'takes you' to whatever you have it transition to.
I'm struggling because I can't find any examples of people doing or talking about it. Like when someone makes a bone animation of a guy holding a sword they never swap out that sword, and the sword is in the same file as the guy
and when they make a run animation it is entirely based on bones animation with stick limbs and never swaps out the texture itself
I'm planning to have multiple sub-state machines for different weapons, and it should transition to the reload animation for that weapon when I press the reload button. Would it transition to another state machine, or will it automatically "prefer" the current state machine/stay in the current state machine
You can move a bone and swap a sprite in the same clip, or in different clips
There's no conflict there
I see, I'll give it another shot then. Thanks
There's also no issue with having those bones spread out over multiple files?
like, not in the same PNG or sprite?
Files? Bones exist in the scene hierarchy
Bones can be generated from skinned sprites but I think that's a manual process
I haven't actually tested that, so not sure; at the very least you'll want both to have matching weights and bone assignments, so I'm not sure you gain much from that.
depends on how you are doing it. If you use psd importer it generates them automatically.
Huh, my bones appear to be attached to the sprite itself
although that is where I made them, so
maybe I'm doing something wrong
It is a confusion of terminoloy.
The sprite is attached to the bones, the bone information exists in the sprite meta file, from which they can be generated into scene hierarchy as transforms by the skinned sprite component
Right.
And so in this case I want a sprite skin on just the legs, and a separate sprite skin on the torso?
Animation clips merely contain a path to properties to change in the specific hierarchy
If the Animator finds a matching gameobject with the matching components to override, it can 'animate' regardless of what the gameobjects are
For rigged sprites, I generally just generate a sprite for each variant and enable/disable the objects. Because that allows for separate rigging for each variant.
So you'd have like, one set of legs for standing and one set of legs for walking that you'd enable or disable based on what the character was doing?
Considering you're using skinned sprites, look into the sprite resolver component as Pinballkitty suggested, and sprite swap workflows in general
https://docs.unity3d.com/Packages/com.unity.2d.animation@6.0/manual/SpriteSwapIntro.html
That's not what I suggest, it is what unity suggests.
Like I said, I don't use it myself 😛
An important distinction 
could i ask you more about this issue? I've been up and down the inspector many times. i cant figure out how to make it behave the way its supposed to.
