#🏃┃animation
1 messages · Page 25 of 1
Would anyone be able to help me out with a (probably simple) animation issue? If u look at the animator in the bottom right, notice how the Melee->Idle transition arrow only fires up once Melee has fully finished its animation whereas the Kick->Idle transition arrow fires whilst the Kick animation is finishing up
this causes my player character to be blocked for a bit after the melee animation
as far as I'm aware settings for both of these should be identical
most likely the transition time is in the wrong place on the kick transition
the melee and kick transition respectively
sorry, again, with settings non-colapsed
looks like decreasing the exit time maybe somewhat fixed it?
Yeah, you are transitioning out of the kick while there is still a third of the animation left.
Yeah wonder why that is though, on further consideration it doesnt look like it's fixed at all :/
Why that is is because you have set the exit time way too early?
The exit time being 0.4?
Oh jeez
I think I just lost my PlayerMovement.cs
.4 means more than half of the kick animation is dedicated to transitioning out of the kick animation. It will be transitioning out before the kick lands, probably.
welp my unity just crashed and I lost a ton of my terrain 😭
Right but the exit time for the melee is 0.4
for the kick its 0.5 something
i've changed it to this
Still looks like its waiting for the animation to fully finish before transitioning but its fine, dont worry about it
I'm gonna leave it be and sculpt terrain again 😭
What do I need to do if I exported a model from blender to unity with a sword and sword animations, but after exporting the sword is not in character hands and it has no animations. I'm new in Unity and sorry for my bad english. Please help me with this problem
The thing is that I used those before, and it has a con that they have to be redone each time an animation gets modified outside of unity
can anyone tell me do i duplicate the animation and then use it in the animator or is there a proper way to do it?
ping me on reply
Hello when animating my 2D character some pixels streatch is there a way to fix this
This is how the character looks
and this is how it's supposed to look
Pixel perfect camera component if you want to keep them crisp, or one of the third party pixel smoothing assets like this https://assetstore.unity.com/packages/2d/smooth-pixel-209066
ok thank you verry much
Can someone help @agile solstice ik you told me to put the character on an empty thing and i did, yet when i apply an animation in the timeline he teleports and gets centred same as before
not sure what to do now
The point of the empty was that the character can have a local animator within its own hierarchy, while having its parent empty moved by the timeline
Dunno if that's how you implemented it
yeah thats how i implemented it, though my issue still stands. he teleports whenever i apply an animation
I can do no more in this situation
😦
ive read a little bit and it says i need another "root"? to the object? what is a root 😭
i had to make track offsets apply to only scene offsets over all
@agile solstice so how do i fix him phasing through the building 😭
@agile solstice yeah im honestly clueless at this point, did a shitload of digging, ive now set colliders for both the character and the house, added a rigid body and it just simply wont collide
Are they meant to? Animations, whether Animator or Timeline, completely ignores physics and collisions
is there any way to make him walk up the stairs? or at least make it seem like he is?
Since you're making a cutscene by keyframing, you'd keyframe the character to move up
how would i do that in timeline? i havent found a way
Question for those working with Blender:
When exporting animations into Unity, do you export them as Actions or as NLA tracks? Which one is preferrable? I roughly understand that NLA tracks are animations that can be combined together in blender to achieve a complex animation with different combinations of NLAs, and that behaviour can be used in Unity as well.
For now animations that I want to export I do not intend to mix together, so... I don't need to use NLA?
I was under the impression that 90% of what you've been doing in Timeline is to keyframe gameobject transforms to move
i have an animtion preset pack so what ive been doing so far is just adding those into the timeline.
under the characters i need them to be on
same things with doors n such
Keyframing an object to move is pretty much the most basic thing you can do in any animation so it seems you have some homework to do here
It'll make the process much easier for you
i mean in timeline im not sure how to
ive keyframed stuff to move but that was in animator
this is in timeline and im not sure how timeline works
for that stuff
The process is nearly identical from what I recall
That's what you need to look up all the same
I hate the NLA editor so it's Actions for me, even though they suck too
The main difference seems to be that Actions don't have the equivalent of Meta Strips, in case you need to export multi-object animations
i mean
i dont see an option to select transform keyframing in timeline
theres are the options i have
unfortunatly when i move the position or rotation it stays in that exact position or rotation throughout the entire animation
These are the settings of a clip
The clip itself will contain the component property overrides
Oh god. I guess I cross that bridge when I come to it. I'd rather stick to Actions as well. Thank you!
right but now we go back to the issue i had at the very start where i cant see the animation as im altering it.
as in i cant see the scene while editing the actual animation clip
You can if you do it through Timeline
Please do some tutorials first
how do i edit the transform in timeline
you just told me
to edit the transform in the clip.
;/
nvm im being stupid
@agile solstice new issue, i need some part of the animation to loop as in lemme show you rq
the animation is only 18 frames right
i need him to run for over 100
its fine, it loops right
but editing the y axis on the animation
would change the entire animation including when it loops
rather than me just needing it at the very end of the loop
timeline
animation tab
The root transform override shouldn't be a part of the running animations
That's what I suggested to use a parent transform for
So that all character animations can happen relative to it, regardless of its position
right if i use the parent though it wont let me see where he is during the animation when im editing the y axis
I'm pretty sure the running animations should not be moving the character at all
they are using root motion
easier for making him walk
and smoother
If the character seems to move as part of its walking animation, that implies the animation is made for root motion but root motion is not used
there is 2 versions of the animation i can use
Otherwise the motion would be negated, and instead applied as motion to the transform, not the animation root
theres is one made for RM and one not
The character should not be moving relative to its root during animation playback if you are using root motion
There might be some special procedure for getting the correct motion from animations that have root motion when making timeline cutscenes
That implies yours is misconfigured
also the game object isent changing his animation 😄 and before you ask yes he is indeed parented to the game object
It feels like you're tackling this whole project with absolutely zero prior knowledge
Which is commendably brave but we can't impart that level of knowledge required just through questions
indeed i do have pretty much zero prior knowledge
see
i need him to have transform effects
when i use apply transform offsets on the timeline though he teleports
so at this point idk what to do 💀
nvm its fine
Hey I'm trying to combine two animation clips into one single animation clip. Unfortunately they have a different root transform rotation. So when I combine the animation clips (by copy-pasting the keyframes from one clip into the end of the other animation clip) the character spins 180 degrees around the y axis.
I tried to figure out how to do quarternion rotation around the y axis so I could counteract this. Aparantly that is done by multiplying the [0,1,0,0] (of the form [x,y,z,w]) by the quarternion vector.
Unfortuntately Unity changes all the values at once if I try changing one of the quarternion vectors. Is it possible to change all the quarternion values at once so that Unity doesn't reset everything?
If I change one quarternion coordinate all the rest of the coordinates aparently change too
That makes it impossible to set things manually
(By setting values numerically in the textfield)
actually i wanted to ask you considering (i hope) you know a little bit more about root motion. how come my xyz values change when i use 2 root motion animations
as in, when i try transition between the two
the entire animation teleports to its original position
Do you have "Apply Root Motion" set to true? Perhaps that would help
indeed apply root motion is set to true 😄
the animation plays with root motion
but as soon as the 2nd animation start
it sends it flying back
very weird to be honest
settings for first animation
settings for 2nd animation
Yeah unfortunately I don't know. Still very fresh to unity 😅
ah, same here 😭
@agile solstice sorry about this but how come hes facing the floor when i play the animation
:/
Hi! Is there a way to make the animation clips look frame-by-frame (the effect of lowering the frame rate of the game) without using the constant interpolation mode?
Constant interpolation is by far the easiest way
Using the "animate physics" option is another very convenient way to restrict the animator's timestep, but it can only be restricted to physics timestep specifically
If you want something like 20 samples per second, you'd have to reduce physics timestep to 0.05
There's probably other ways around it, but I've found nothing concrete
Is there a way to force an animation to not be read-only?
As the duplication trick does not seem to be working this time, so was wondering if there is an alternate way
duplication trick worked for me. try selecting it and clicking ctrl + d it should duplicate it seperatly 😄 or go into edit do what you need to do and then leave it be
@agile solstice quick question. how would i make prefabs/props dissapear on the timeline
i need them to dissapear on a specific time though
sadly seems to not be working on this particular animation I got from one blender-to-unity addon
just thought there was some alternate way I could try forcing it to not be read only
@leaden prism thrres one way 🙏 go into blender and modify it there. i forgot how but u can change it to be changeable there. search up sum tutorial for blender for it 🙏🙏🙏
I'll check that out, but I think it might be due to some thing in the addon forcing it to be readonly
should be changeable in blender my friend
Animations that are a part of an asset are read-only because the asset controls them, duplication separates them so it "fixes" that
Another reason why animation clips could be unmodifiable is because they're Humanoid animations, which are themselves locked from being edited within Unity
This particular animation is not a part of an asset and it also is a generic one
help! why my animator wait for end of animation for do the transition?
hey super newb question. so I got a human model. and I want to stick it on the rig for the unity 3rd person template. any tips?
Basically just wanna use all the default animations that come with that so I've created a model that matches the size of the rig.. just looking for steps on how to attach.. do i need to weight paint etc.
a guess the question is more of resources and what to google or if im going about it the right way lol.
Guys, is there a way of randomize the cycle offset of an animation directly from the animator or do I need to use a script?
You will need to either weight paint or use some tool that does it for you, generally.
You'd need to use a script.
Do I? Really? That's a boomer
What tool does it for you
I mean, not a very complicated one. There's just no 'random' function there built in.
Why do my hands shake a lot? I use IK and change the weight. Code https://gdl.space/gadahazopa.cs.
in Unity 2021 Animator, I have a sub-state machine thats blue... but in another project that I am looking at as a example, the substate machine is orange. what is the difference?
When something flickers really fast is usually cause you have something telling it to be in two opposite points of the animation in just two frames; or you have two animations that are interpolating incorrectly
Everything is fine there, I think it's due to the weight change
hi, does anyone have any resources regarding an animation being able to affect multiple rigs? sorry if that's a weird way to describe it but if it helps, my current dilemma is that for my game i'm using rigged viewmodel hands that are separated from weapon rigs, and ideally i'd like for the weapon animator to affect the viewmodel hand rig without having the hands explicitly part of that gameobject. again apologies if that's hard to parse but i can elaborate if need be (attached is a crappy mspaint diagram that maybe helps explain)
i know unity animator animates properties by name, so would it work if the bone names are matching?
so i have a animation setup
but when i export in into my game
only the first like 5 seconds play
then it just doesent play the rest
sometimes when i export it plays some things sometimes it doesent play others
differs every time i export
Hey so right now this is the avatar for one of my characters and I want to make it so that the bones for the foor are flat but when I move the bones the mesh also moves, how can I fix this
your all good, trust me, it doesent effect it i dont believe, at least from my experience using animations the feet are fine
the animations I am using rn from maximo make it so that the character has his heel lifted
hm. then im not sure sorry
Hey, I'm having some trouble with Any State again and I'm wondering if it's just genuinely unstable and shouldn't be used (since that's what I found when looking through message history)?
This is my current layout. Ideally I'd like to be able to set a trigger to move to any animation of my choosing; it's for a Live2D character portrait. Each transition I'm pretty sure is plugged in the way it should be and I used a Debug.Log to check if the block of code where the triggers are set were even being accessed and they were, so I'm kinda at a loss for what I'm not understanding
Just an example of one of the transitions
Actually I may have figured it out. I think it may be because the script is referencing the animator of the prefab and not the instance
Had Warnings off so I didn't see the "Animator is not playing an animatorcontroller" warning
as long as it has the same rig structure, you can share animations between multiple rig (if that's what you mean)
Any State is not unstable, but rather unpredictable
Trigger transitions however are unstable
Has anyone encountered issue in build where animator state is playing but its state behaviour is not working in Build?
no logs are being fired. Someone please help me.
Does setting a layer in the animator to "additive" screw up with the transition between animation clips?
Ok no it was the idle animation messing this up nvm
any chance youd know why my door and wall animations arent playing when i export it into the game? it works otherwise.
they are both in timeline
havent found anything abt it online
🤦 i had it set to static
Would animations made using shape keys in Blender be exported to Unity?
I know I can see blend shapes in the editor but I dont know how to use this to create animations with the animation window and I don't want to do it via scripting.
I tried making the animation in Blender but I can't see it in Unity, so if anyone has done this before and could help ty
Also I cant see my keyframes in the action editor but only in the timeline in blender
Thank you
So would the advice be to avoid them and build systems that use different parameter data types?
It really depends on what you are trying to do. It looks like you have set up a system where it can get overlapping triggers, which would be a regular source of issues.
I did edit it to have only one trigger be possible to happen
But it did not trigger even though I'm like 98% sure it should have
Might be a code issue
What could the issue be
The block of code is accessed, used a Debug.Log to tell that it's always being run at the right time
I think I have the answer to my issue though
But until I alter things, I won't know. I think it's because it's accessing the animation of the gameobject prefab, not the instance of the gameobject in the scene
But yeah it was giving me a warning but I had them closed off since I figured it'd give me an error if something was wrong
It seems to work after fixing that?
I recall seeing something in your console that looked like something about legacy animations perhaps
The problem with trigger conditions is that they can get stuck on and need to be reset from code, which you should be able to see happening in the animator during play mode
Triggers are kind of like booleans that are flimsily automated to turn off
Well spotted
I've just implemented a new system with this potential fix and it has completely fixed my issue
I changed the system to one that uses a single int parameter
Much cleaner and it seems to work perfectly
Thanks for the advice on triggers, I'm gonna keep an eye on them being weird more readily whenever I use them again
why doe sthis happen with my shadows?
the shadows are on a walking blend tree, exact same as everything else,though all of its animations do have unique rotations, positions, and scaling though
But the animations have no exit time, and the animations are all 1 frame, just adjusted for each walking direction so it should instantly jump instead of weirdly bugging out like it does here
smth im missing or?
I see in the blend tree when i move the x,y parameters the shadow positions, but i dont want this weird blending. I know it's a BLEND tree but i just want it to move along with the character at the exact same time
Post only to one relevant channel
Blend trees are made for blending, but you can "snap" the variable to increments in code using math before you give it to the animator
Round, floor or ceil are the simplest ways to snap, but if you multiply before you round and then divide by the same value you multiplied with you can control the increment
ty spazi it worked
I'm using ik hands on my fps player model
and when I play reload animation
my hands don't move as my ik's are on work
Is there any way to play animation when using ik?
✅ Get the FULL course here at 80% OFF!! 🌍 https://unitycodemonkey.com/courseultimateoverview.php
👍 Learn how to make BETTER games FASTER by using all the Unity Tools and Features at your disposal!
👇
🌍 Get my Complete Courses! ✅ https://unitycodemonkey.com/courses
👍 Learn to make awesome games step-by-step from start to finish.
🎮 Get my Steam Gam...
This should maybe help you understand IK with Animations
does anyone here know how to solve this #archived-code-general message
perhaps frame 0/1 has a translation. or, maybe it is related to root motion
maybe the first frame of the animation has position information that is causing it to move to the wrong place
ok. i am logging off for the night. good luck
My guess is you're animating the root transform of the gameobject, so its position is overridden
If I got a question about animation events with code, can I ask that here too or should I use #archived-code-general for that?
Depends is it more of an animation event question or a question about the code in the event
Pick one that seems to fit closer and if it doesn't work out ask again in the other place later
Alright, I'll do that then. thanks
I don't know if this question belongs in animation because it's not specifically about how to do it, it's more conceptual so if it does belong there, I apologize.
But can someone explain how animation works within a game loop?
So for example, let's say you have a simple scene with a cube in it. Right now every time a script's update() is called, I update the cubes position to make it move. That makes sense to me.
But let's say I've got a humanoid that has a run animation. I know the humanoid model gets rigged and whatnot but how does that conceptually work in the code? Would the update method just call the animation once? If so, how does it keep getting rendered each frame? Unless it calls it more than once?
guys, when i have a single animation. or copy an animation out of an object. how can i add events? i dont have all the options on a single animation
Guys do you know why the blue indicator can't go past 0.15s?
Hello guys
I record some animation for animator, with using of blendshapes of my humanoid model
And when i stopped, my default model being freeze in Mecanim pose
I have T-pose animation in my project
How to apply default pose again?
Saw same post at Reddit(where i take the pictures), and author got solution, but i didn't get it
I know one way how to solve issue, but it's will take a lot of time, any solution exists?
how do I lock an axis in IK?
so an leg or something doesnt move to the side, but only forward and backwards
For animation files you use the animation window instead of the inspector.
What kind of IK are you using? Not all IK algorithms allow for that.
Im using the Legs Animator addon
ecuse me
i just need little bit of help
i import animation from mixamo
and when it is in unity
it don't work
when i click on him
it do that
So you're using someone else's pictures of their issue but not linking their solution for us to try and figure out what you are talking about
Ah, have you asked the author of the addon?
It's exactly the same, i also made my own reddit post, with my own pictures, but there's no difference between the same situation
I'm prefer to know solution, not about differents between pictures of the same problem
Yes and the author said that directly implementing what I want isnt in Legs Animator, he did Show me an IK axis "blocker" but it only worked to a certain degree
That isn't the point. Point is you say 'I don't understand the solution' but don't link it.
So what you want?
please
You don't really give enough information to guess at the problem.
I input my fbx model of character into hierarchy(scene), sure it's humonoid, it had he's own default pose
I starts to record animation and after i stop recording and stop preview, my default pose of model broken, exactly like at screenshots i showed
So, any solution?
i have this folder
and this folder
my farmer properties are like thet
and idk what can i give anymore
help mr pls
i'm actually trying to create my own blender character, after, i import it on mixamo and i download animation, so when i came in unity my animation work but i don't see it ( you can look at the top to see image) thanks
Someone gonna tell me how to fix dis
Try enabling Loop Time in the animation clip
Okay lemme see
Still doesn't work
any help with this?
Is there a way to turn off interpolation in animations
i am slowly moving my 2d project to 3d i have a couple of animations i want to import with there controller. when i do the animation does not play. Do i have to build the animations again? or should they work
If you're animating the gameobject's transform to be at a specific position as I assume, then you'll want the character with the animator to be a child object of a different transform
Morning all! I'm using the Unity Animator to apply a looping 'dance' animation to one of my characters. When the player touches the character in this dance loop, I'd like the character to move slightly (i.e. slight feedback for the touch), but to continue dancing. How should I be looking to do this?
Nothing stops you from moving the animated gameobject using any of the normal means, unless your animation is also overriding the gameobject's transform position
In which case like I said just above you'd move its parent object instead
Ahh ok, I'm animating a child object so I'll transform the parent on touch. Thanks Spazi!
anybody know?
Someone gonna tell me how to fix dis
when you imported it did you use humoid?
in the settings of the animation ??
hi, i cant drop a sprite on the animation anyone knows why?
i cant even select this
I believe you must have selected a gameobject with the animator and a sprite renderer on it to be able to animate it
oh right problem solved thanks
Still not sure how to resolve this :(
Select all the keys and make them linear, not just half of them
Also, you can reframe the view to curves with F so you can actually see what's going on
anyone knows why this happens and how to fix it?
my camera bone goes up even though I didn't rotate my bone up in blender.
And If i remove the properties here then I'll lose my camera shake for my reload animation.
I remember this wasn't the issue when I first imported these animation from unity
One question in games like sim city in 2d with spine, we want to animate some specific animations like going up stairs. Do you prefer to animate root point (root motion) or consider it as fixed point? Which one is standard?
They are not in-place animations.
Should root point always be under the legs in all animations?
Also consider IK in foots, please
could someone please help and explain to me why does some of my animations clip thru the terrain like this?
Your animation is moving the object on the y axis?
Or your pivot for the sprite is not in the right spot
could you go into little bit detail?
Hey! I need some help please
In my timeline I am trying to stitch a few mixamo animations together, however each one of them start and stop at a different position. I tried track offset but I don't see anything change after setting the offset
I tried both
Hey, I have a problem with the Animations of my Sword. The Sword is a child object of the Character and so i cant animate both together right? I feel like I have to animate both objects indepently and make it somehow work this way but I have no Idea how to implement that. I'm somewhat new to Unity and so i dont know if there is a nice way to fix that. Thank you!
Should I use skinned for all models if Im using ECS?
hey, I'm using animation rigging , does anyone know why the Tip doesn't reach the target completely? I have all the weights at 1
If I move the target a little up, it works, but it doesn't help me because then the movement breaks and the hand does not remain "fixed" with the weapon, afaik, the tip (hand) should reach the target as it is right now, but it doesn't
heyo, can anyone give me a hand with assembling a model for animations
its suposed to be a model of a stickman than i need to animate
but once i slice up the different parts in the atlas i can only create a bone for each part but cant tie the bones together
couldnt i fix it by doing like a PlayerHolder?
Hello I am very new to unity but I am looking to add a roll animation to my game. I found a rolling animation from mixamo but when I try to put it into my animator tab it just keeps running the animation over and over again instead of going back to the idle state. (the animation I added is called "Quick Roll") Does anyone know how to fix this? Something to keep in mind is I chose a 3rd person controller asset from the unity store for my project. I did not make this blend tree from scratch. Any help anyone can provide would be very appreciated.
I'm trying to anchor an empty game object to a part of an animated character that doesn't have bones but is influenced by the other parts of the character that do have bones, so what is a good way to keep an empty object on to a piece of mesh thats moving, with no bone to anchor it to?
I recently upgraded a project from Unity 2017 to Unity 2022. It wasn't originally my project, but the code is now in the public and I'm working on retooling it.
For some reason, when certain animations play, both the player and the NPCs look like this, but when they walk around, the animations appear fine. Does anyone know what might be causing this so that I can try and solve the problem?
Does anyone know how we can add sounds to animation clips?
is there a way to animate with ECS yet?
If you want to make a specific animation for your sword you just have to use that animation for that game object. I did not quite understand what you want to accomplish but if you want with a specific key to see the sword animation, so whenever you press the specific key to play the animation only once then you probably have to disable the loop of the animation.
Are you pressing any key for the sword smash?
Whoa 1st place price is unreal! https://www.youtube.com/watch?v=uHqINLAi-1k
Download the Project Files: https://bit.ly/eternalascentfiles
Join the Discord: https://discord.gg/createwithclint
FREE FOR THE MONTH:
Grab EmberGen/GeoGen for FREE this month: https://jangafx.com/eternal-ascent/
Record suitless mocap with Rokoko Vision: https://www.rokoko.com/products/vision
(email support@rokoko.com w/ the subject "Pwnisher 3...
I'd start with unchecking the Has Exit Time box. You might be jumping and landing before it ever gets the chance to transition out.
hello ?
How can I set a BlendTree node speed from script? I have an animator "Speed" parameter which is used to control the blend, but it doesn't affect the animation speed, just which animation is played.
(oh, found it it's "multiplier")
Hello, I have a blend tree for my animations that contains the walk and run cycle of my character (among others), and how can I do a smooth transition between the animations when assigning a value to the blend tree (it directly switches from walk to run without transitioning as in the classic Animator) ?
Hey I figured I'd ask this here, I imagine it's a simple answer but I'm having trouble finding it. I made a character, animated an idle and a walk animation for them(should be noted, i saved these on 2 different files). Im having trouble importing these into unity and getting my character to transition between them. Any advice?
i have an root a root motion animation that should move model 2m however its not moving the full amount. what could be the issue?
That would be done on the scripting side; the blend value is used directly, so if you want a transition you would need to smooth the value before sending it to the animator with a lerp or other easing function.
It could be he applying scaling to the movement based on the size of the character due to either scaling of the object or animation retargeting. It could also be due to physics, if you are using physics on the character.
What kind of difficulty are you having, specifically?
does anyone know how to fix this problem. I got a animation that triggers off mesh rendering in the scene. When in game it doesn't render it out
this is how it suppose to look like
and when playing it does this
any clue why
So i got this animation with root motion on and the character controller only seems to move a just a little
Hi! I have an animation set to run when a trigger gets set, but for some reason it wasn't playing, checked the animator, everything seemed fine, but the preview ont he transition didn't play. The animationclip plays in the animation tab, but not the animator, I can't figure out why
Hello! I'm working on animated objects. I want them to play simultaneously. I used Layers in the animator with Additive Blending for the 2nd clip to overlay. But the first frame of the 2nd clip when I play the scene is different from what it was supposed to be. I animated them in Blender then exported to fbx.
1st image is the first frame of the animation. 2 objects are placed on the left side.
2nd image is a shot when I play the scene and the 2nd clip animated object is at 0,0,0 transform when it's supposed to be at the side on the encircled area.
3rd image is to show in the clips section that the 2nd clip animation's first frame is at its correct location.
I can't figure out what to do to fix it and I would appreciate some advice on this. Thank you.
Animation clips essentially are transform overrides relative to parent
So, in this case it's possible that there's some parent relationship that's lost on export
So, the simplest fix might be to give the rotating part a parent transform and move it with that to the correct position
Thank you for replying.
As for the parent relationship, both are in the same parent which is correct. I don't understand the "give a parent transform and move it to the correct position" part.
If the nut is moving to a wrong position by its animation, then giving that a parent empty gameobject and moving that would let you move the where the animation happens
However, I see that it probably doesn't have its own animator so doing that would break the animator hierarchy
In that case I would try to figure out why the offset happens in the first place, by doing some test exports with different configurations
Yes, the animator is applied at the top of the hierarchy and not on the individual parts.
I did try reversing the order of cover and nut, nut being the override and cover being additive. The nut was in the correct place at the side. But I can't have both of them as overrides as it only reads the one at the bottom and completely ignores the animation at the top. 😖
If the animation is simple, it may be worth it to animate them in Unity so there's no possibility for export problems
Yes. But I was instructed to do animations in Blender then go to Unity. I'm also asking the client if I could just rig them with bones so that I can have just 1 animation clip. I'm more used to bones than just objects. It's my first time doing this with animated meshes. But I still need a 'go' signal from them hehehe 😄 I hope they say yes to rigging it 😆
Thank you for discussing this with me @agile solstice
Yes, bones are what I'd call the most robust way to export a whole animated hierarchy at a time
Multi-object animations can also be exported using the NLA editor as a "meta strip" so they end up as one in Unity
Meta strip....that's new to me!! I would love to learn more about it. Can you lead me to a link about meta strip and how to do it? So that I won't take too much of your time asking about it here 😋
My brain is desperately trying to erase any knowledge of the NLA editor but I seem to recall that you "push down" an action in the action editor to create an NLA strip of it, then select strips of multiple objects and right click to "add meta strips" which should create one meta strip
Hahaha 🤣 thank you for remembering then. I will try that 👍👍
Seems to point to issues with transition or conditions
During play mode with the animator window open and the gameobject selected you can see exactly what the state machine is doing
That should help troubleshoot the issue
Hi everyone, I've been looking at ways to optimise my game and I've found one that talks about reducing an animation to not play each frame of the animation but 1 or 2 ever seconds for objects far away from the player. How would I go around doing this?
Not easily
From what I heard updating the animator state manually forces it to become single threaded which may cost performance rather than save it
Before you consider such things you should first profile your build to find where the performance bottlenecks really are
Thank you!
I just don’t want to make my systems and then it run at 5 fps
anyone online ?
I have an animation made, but when exporting and importing in unity, it will make the rig messed up
When I click on reset pose, it will give me errors
Anyone has any idea what went wrong?
@gusty prawn Read #📖┃code-of-conduct don't spam DMs
my dude, i just asked @agile solstice if theres a way to trigger a particle emiter in an animation
spamming is when im repetedly asking the same thing over and over again
It's not a discussion.
Just don't do it in the future
so i cant dm any person here for whatever reason ?
Ask permission first
the permission is set by discord, if they dont want to receive my message they can simply decline it. Youre acting as if i did a crime for sending a simple direct question to a person i have found knowledgable and asked for advice
@gusty prawn Yes, your own DMs are blocked, why bot was unable to message you with the warning. Think about being considerate to people who do not block DMs.
i dont block DMs
i actually have this in my gokart 😄
Then you are blocking the bot specifically. Which doesn't make you immune to warnings btw.
i aint blocking anything
and in situations like this its better if we talk about it in private than to spam the animation chat with stuff thats unrelated to animations
Hmm, Dyno might have had an outage moment.
Consider listening to moderation. There's indeed no need to continue this
well it just dosnt make sense to me to get warned for sending a DM to a person like a normal human being seeking advice. If they dont want to talk to me, sure thats fine, they can ignore my message. If im being persistant and sending them messages again and again thats called spam and is annoying thus it should be dealt with a warning
Right, for the last time. Listen to moderation and you will be muted for spam if you continue.
well, seeing this as my first interaction with people inside the Unity community i would preffer to just end it here
This is my first time making a 3d game and I have this 3d model of a robot but for some reason when it collides with a wall the parts go all over the place
since the model is rendered with skinned mesh renderers I'm assuming I have to fix some settings with those
is there some way to disable collision with them?
What do you precisely mean by colliding
Only gameobjects with a rigidbody can react to other physical objects
An animator and a non-kinematic rigibody cannot both control the same gameobject or weirdness will ensue
Or does your collision detection involve some non-rigidbody methods?
after properly looking at my settings my box colliders which were not triggers had dynamic rigidbodies attached for some reason and making them kinematic solved the weirdness
i assumed i already made them kinematic in the first place
thanks
how would I use entities for armatures which have multiple separate meshes attatched to them. Like for have machines with hydraulics and such? Or is this not a thing
Hmm no idea what "use" "entities" means here, but if you want mechanical rigging you'll benefit from constraint components, both the default ones and those from the Animation Rigging package
Cheers thanks
If you have more specific questions or examples what kind of mechanisms you want to make then I might be able to give more specific advice
I’m making a factory game and I have a conveyor model which has rotating bolts on the side. However I know having lots of animations in a game can cause performances issues and I’m wondering how I can improve it.
Depends
Animators are pretty performant, especially if you need a few to control many objects
Recent Unity versions also support GPU skinning which can make animations using skinned mesh renderers even cheaper
I also looked into that and I’m struggling to get things like machines to have 1 mesh
You'd use the same techniques as when rigging a character mesh to multiple armature bones, but not having worry about any weights below one if you don't want any smooth deformations
Any good tutorials for this anywhere. I’ve never tried rigging a character mesh or anything.
Many, but I wouldn't be able to point to any one
It's a really common workflow
So would you recommend all models to have only a single mesh?
That also depends
Using separate objects gives you a lot of control to swap parts, but GPU skinning can be more performant
I'd compare the performance and choose by situation's needs
So if I had separate materials should I use separate objects then? I’m just thinking about the entities system and how I’d mix the 2
Separate materials may hinder batching and thus performance, but I'd profile the impact of that too
For designing an Aim Down Sights system, supposing you have arms for your FPS controller, is it guaranteed that the gun will be centered across all different resolutions? Currently I animated everything in blender (including ADS) and when the player holds RMB, the ADS animation will play. However since it's arbitrary animated, I was wondering if it's centered in every display
Probably not guaranteed if you are changing aspect ratio.
makes sense, thanks
Where's the parameters tab for my animation controller?
Hey, sorry for my late response I thought that no one answered. Yes i am pressing right cick. But I have 2 Animations playing when this happens. 1. I play the animation of the character moving in the right direction, then i play the sword animation in the direction the mouse cursor is. When I attack on the right side of the character, the animation looks obviously kind of normal, but when i attack up, down or to the left of the character, the animation doesnt fit because the character always slashes to the right. I have the "Sword" as a Child of the Character because Animation a sword for every single angle that the mouse cursour could be is impossible as i know. So my idea was to create seperate animations for the purpose but that creates the problem of the character not facing in the right direction.
Does resetting the interface and/or restarting unity bring it back? I've seen that happen before but never permanently.
is there any way that i could make it so that if a object is set to be not active mid animation, it just goes back to the first keyframe of that animation
From that description you'd want to set the animation time to 0 when the object is enabled again
What's the practical example?
i was thinking more that the animation time is set to 0 before it gets disabled
This doesn't look to me like an expected result of re-enabling a gameobject, as the animation seems to remain broken
I would place the animator and game window side by side so you can see what states and transitions are being played when the problem occurs
okay so i swing the hammer, the animation state plays, then the hammer gets disabled when i pick up the ball mid animation, and then when i drop the ball it goes to the empty animaton state while the hammer is still rotated incorrectly
if my explanation is bad i can record a video if you want
Just off the top of my head try enabling Write Defaults on all the animations
And prefer an animation with the default position as your idle rather than an empty state
write defaults is already enabled
and alright ill do that
give me like 5
new question (this is super basic but ive never worked with animation before so excuse my lack of knowledge) how exactly would i make a new animation for the hammer if theres already one made for it
i tried making a new animation but the add property button is greyed out
nvm i got it
i did that it still doesnt work
okay i fixed it thanks
I have a character and it is not playing any animations even though the animator is correctly setup, the animations are fine, i am using character controller, I can give more information about this issue. I am new to unity sorry if it is a bad question, but my professor couldn't help me and I cant solve this.
The animations are transitioning fine, i am using them from another project, the problem is that the character doess not do them
I got an asset from the asset store and it only did the built in animations, after i applied my animator it sort of glitched out, i tried changing the rig and etc but now it doesnt do any animations.
I even went to another project and tested the animator, it worked it has something to do with unity not recognizing its bone structure i think? I dont know and I cant figure it out.
Yeah it works now
That animation seems to be the opposite of fine - all those yellow names are broken links.
Most likely, you changed the hierarchy and didn't edit the animation to match.
I am having trouble playing out an animation in a character that I downloaded in Sketchfab. The animation loop is playing in the animator, but the character does not show that. I tried changing to generic and humanoid but it still does not work. I also tried putting the character on Mixamo and downloading the animation, but the issue still persists.
is the issue with the model itself?
Hey guys, how I make to when Jump is true and this Land animation is running, immediately transition to Jump Start?
At moment when I jump is true and is on landing, my char jumps but the land animation keeps landing and it jumps with the end of landing animation
hello i am trying to display an animation before the apple instance gets destroyed but unfortunately when i tried using an event in the destroy animation the function isnt supported and a warning is showing up below. Im using a trigger to play the animation but it never gets activated and the animation dosent play either also the object dosent get destroyed the only part which is working is the collision and the score please help me solve this problem
using System.Collections.Generic;
using UnityEditor;
using UnityEngine;
using UnityEngine.UI;
public class Item_Destroy : MonoBehaviour
{
private int Apples = 0;
[SerializeField]private Text applecount;
[SerializeField] private GameObject apple;
private Animator appleanimator;
// Start is called before the first frame update
void Start()
{
appleanimator = apple.GetComponent<Animator>();
}
// Update is called once per frame
void Update()
{
applecount.text = "Apple Count: " + Apples.ToString();
}
private void OnTriggerEnter2D(Collider2D collision)
{
if(collision.gameObject.CompareTag("Apple"))
{
appleanimator.SetTrigger("Play_Destroy");
Apples++;
}
}
public void Destroy_Prefab()
{
Destroy(apple);
}
}```
this is the script responsible of handling destroy animation and destroying the object
im calling the last method in the event
What you can do if you didn't is to separate sword and body animations , so instead of having a single animation for both the character movement and the sword attack, consider separating them. Have one set of animations for character movement and another set for sword attacks. This way, you can play the appropriate sword attack animation based on the direction of the mouse cursor without affecting the character's movement animation. You can try it out and tell me what happened. If you want you can make a thread to join and show me detailed with screenshots etc what is happening.
It could be animation compression on Unity's end, unless you've tested reimporting into blender and it's still wrong
Help guys, my gun firing animation is broken because when I interrupt the shooting animation by shooting again before the animation ends, instead of returning to its original position/rotation, some values are added to the positions causing spamming the shot is rotated up or down
no
It's because of an interruption that this happens to me, and when the animation clip ends
i think
maybe a cooldown?
Do you have root motion enabled?
It sounds like like a question for !blender as the issue sounds like it's contained there?
A supportive community for Blender artists of all levels. Share your work, ask for help, and learn from others! https://discord.com/invite/blender
idk how to explain but
I have a shooting animation for my gun I made in blender
It basically has to parts
when It shoots the goes up and then goes down
Now my shoots full auto with a fire rate
when I hold my mouse button
I don't want the entire animation to play but to sync it up with speed
but also play the original animation when I single fire
like other games
anyone know what to do?
why cant i assign my animator?```cs
public Animator GunAnim;
are you trying to assign the gameObjects animator or any other object from hierarchy?
yes
please elaborate which one do you mean
animator
wait a second
i get a blocked-sign
dang
try this
public void Start(){
animator = GetComponent<Animator>();
}```
this way you dont have to insert the animator onto the script
the script gets it through code
try it
i`ll try
got it to work, thanks
plays the shoot animation like 10 seconds after I shoot, why?
Question, is possible to consume a trigger without changing of animation? Or maybe prevent it from being set on?
Basically, if my character is in X animation, I want any attempt to trigger Y parameter to fail or be ignored, so it's not set and nothing happens.
I was bashing my head against the table all morning over this. So in case someone just so happens to run into this same issue:
Using the Animator Update Mode "Animate Physics" will actually break Animation Rigging's Multi-Aim Constraint
Like, it will just not do anything. So I guess you have to set the Animator to Normal Update Mode if you want to use IK properly.
are you talking to me?
why my character don't appear
i create it in blender
and i rig it with mixamo
but when i import it in unity it do this
is it posable to remove the transiton on entry? i want just any state
how do i stop this playing on load. the tranition is empty
how do i change the speed in the animation window?
brackeys has a "samples" variable which doesnt show for me
Samples is not the speed. It is how many FPS it is. Brackeys is likely using it wrong. That said, the sameple rate can be shown from the dots button in the upper corner of the animation window.
Add an empty animation state before the build and set that as the start state, then add an actual condition to transition to your actual animation.
No. It always has to be in some state. ('start' is not a state, it is just the entry point of the graph.)
guys is there any form when i play my shooting animation each time the player click the button for shoot the gun gets his original rot/pos?
i think this fits here. my model was broken whe i imported it into unity but this program says it looks fine. does it?
i finally got a start page done. sadly it took me all day to make. and now i wanted to import my character and mess around with the animator pannel
disable root motion
are you baking the y position in the animation?
what do you mean?
I mean that if you bake the y position of the animation into the animation, then jumping, climbing, etc will not affect the character's root position.
So should I bake it to every animation?
So I recently started my first game (2D, Top Down). I am getting into animation. I was wondering what the best method would be when transitioning from right movement to left movement and vice versa. Would it be better to just flip the player object or have separate left and right animations (I'm guessing it is just situational, but I was just wondering if there was a common practice, as I want to avoid bad habits!) For now, I am just flipping the entire player character. Additionally, if flipping the player character is fine, how would this work with a blend tree (just learned about blend trees today), as I would only have 3 directional animations rather than four.
I don't know how your climbing system works. Just trying to narrow down possible issues.
I dont know if I should be doing it like this but, I have a collider in front of the player, and if it detects anything it triggers the animation:
There is no right answer to whether to flip or use separate animations, though if you are blending then I find separate animations work better than glipped ones.
You'll probably want to use root motion for that type of climbing, with y motion not baked.
You might also need to account for gravity during the climbing animation.
I am super confused, I have got 2 birds and 2 scenes, I animate the 1st and the 2nd. Everytime I animate one, the animation of the other changes to the animation I have edited and both of them do the same animation even though they are in different scenes.
the problem is that the jump stops working, and only does the animation
and there is no option for bake
You didn't unfold the dropdowns so yiu can't see it.
I don't think I can explain myself any better
when I change animation of the second one the animation of the 1st also changes
Can it have anything do with:
I duplicated the 2nd bird from the 1st and gave it a different animation
can it be related in any way?
You are using the same animation controller for both
and the same animation file
as soon as I use root motion, all my movement gets messed up, I have been changing for hours the bake settings to try and make it normal, but I cnat, isnt there a way to make only the climb animation rooted?
sorry I am pretty new to this stuff, what is an animation controller? (animation file also)
You can enable and disable root motion in your script. You can also, instead of using root motion, teleport the character at the end of the climb animation.
how do I enable and disable it in code?
whats the command
weird question, couldnt really find anything on google, but is there a way to get the animations "forward"? I would expect it to be the root, but the root in inspector is never set, even when root motion is turned on.
my character ragdolls in a direction, so I need it to face the right direction to do the animation. this seemed like an easy problem but nothing Ive tried has worked.
[your animator reference].applyrootmotion
added this, however the character still is affected by gravity, i am using a characterController.
what should I change?
youre setting characterController.move somewhere right, make sure the y there is zero and nothing else is setting the position of the character.
you could also try turning off the character controller just to see if the root motion works then, though I doubt it. Im hesitant to give ideas because Im in a similar issue with root motion right now
anyone know what's causing this hand movement?
the IK target is planted on the floor and does not move (it's not a child)
This uses the rigbuilder from unity
flm. this only causes issues when you grab it and move it yourself
6 hours of going mad. bleh
its the worst when this happens but its an inevitability of any software related work. This has happened to me with unity, blender, substance painter, etc. just part of the process, as frustrating as it is (nice siegward pfp btw)
Hey people, I've been trying to get my IK to behave according to my Avatar muscles and settings but it seems like no matter what I do the IK just completely ignores the limits set for the avatar. Tried everything I could think of and can't seem to fix it no matter what
There's nothing other than the 2 bone IK affecting the hand yet it doesn't care about the Avatar limits
Is there a tutorial for procedural animation for robotic dogs ( like spot from boston dynamics? (where I can limit movement axis etc)
can only find spiders but they dont explain how to lock the axis etc
I already have the dog model rigged
@winter lagoon the way I would do it is using the rotation constraint, you will need a reference object as a sibling of the constrained bone, then you choose which axis you want to constrain
this will prevent a bone from moving in frozen axis completely if the weight is 1
and how would I make it walk then? Any tutorials you can recommend?
procedurally not super familiar with the workflow but what I would personally do is animate a basic cycle
then assign an IK to each of the legs
and raycast or project on a layer that only includes map to check where the ground is and prevent the IK target to go any lower
although there are most likely better methods
why do the legs in front act differently
whatever is updating your IK target position is not doing it at the same frequency for the front two legs
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 -...
im using this script
but just basically used more legs
i set that to 1 and its the shortest I can do and its stil buggy
Why does every humanoid model do this weird pose whenever i switch on preview for an animation, and recording the animation just straight up doesnt work?
it might have to do with layer masks
what layer is the animation playing on
what happens if you reduce it below 1 for the front two
stays the same
as in, same distance before it updates or as in it also does the weird spin?
it stays the same as in the video
so the front two legs keep updating less often than the back two legs
the back two legs update too fast aswell
they move on like the centimeter movement
wait you're updating it for all legs?
can you make it a public variable and edit front legs individually?
this is the code for the solver that unity gives you
and it says that its updated once per frame
hmm, there are a lot of things that can potentially go wrong
check if otherFoot reference is for the other front foot
also check the transform body is correctly referenced
it needs to be the other foot, or else it moves both legs at the same time
Yeah, the other front foot is what I meant
also double check the body referenced in the editor, one of the conditions for moving the front legs is not being met
its the same for all legs right?
yep
I have a 32x32 sprite sheet split into 2 sprites but for some reason i can see a bit of a pixel from the second sprite in the first sprite. any ideas?
also this position isnt stable AT ALL
I split by cell count so I dont know why it'd be off
is it possible to show the sprites and settings you used?
also if it's just 2 sprites you can manually do it in the unity sprite editor
This is the default pose for Humanoids, caused by empty or Humanoid-incompatible animation clip being played
So, I am creating a 3D game as part of my finals and I am wondering, how can I create my own animations? (I am using Game creator 1, with polygon dungeons, knight and fantasy character pack)
The idea behind my own animations is creating simple incantation movement for spells (mostly arms / hands movement).
I mean I would gladly buy them if I found any that suit my need
That is the mecanim equivalent of a t-pose(all muscles at 50%, used when there is no valid humanoid animation applied.
Your image might not be entirely the correct size. If there are a few pixels padding onnone side but not the other, it will break cell count.
You can do it in any number of software, or in unity itself, though if you do it in unity you'd have to do it as generic animations(and either use a generic avatar or convert the animations to humanoid)
but why does it just lock itself to that pose, when i try to make an animation for him he just snaps back into that pose, and new keyframes dont show up in the timeline
The animation editor has been randomly crippled to not work with mecanim animations.
is there any way to fix that or do i just have to go and do my animations in blender now?
It'll be blender or Generic animations
You have to animate as generic, but you can export the animations and reimport them as fbx. A stupid workaround but it works
I tried using blender as the tutorial on youtube showed it to be kind of easy to create movement, but when I imported my model the skeleton looked like this and deformed the body as I tried to move anything
Can anybody help me with the exporting from blender and importing to unity?
Normally you have to bake the animation and then just export it to an fbx, I have done it ages ago though so I dont know if it still works properly
press f3 in blender and search bake animation, idk where the button exactly is
or bake action its called maybe
Also, anyone knows the best way to show 2d animatied cutscenes? Exporting every frame into an png and then remaking it frame by frame sounds both very resource and time intensive.. Or is there no better way really?
video player component
Seems like I could improve my googling skills, havent heard about that yet haha
but i'll look into it, thanks!!
But after I bake and export and import to unity that FBX has so many animation clips? How do I know which one is right?
guyssss how i make this animation more soft by transition?
Can anyone make sense of this
I noticed that the animation on loop start it moves back to the capsule
like a reset kind of thing
when i applied a mixamo animation to my model in unity to made my character too big
Animation are made for root motion but root motion is not used
Can somebody help me here? I am trying to add SFX and VFX to my animation and I read that animation events are best to really sync everything up as it should be, but I am getting this
"StartAbility(Function Not Supported)"
and
'Character_Male_Peasant_01' AnimationEvent 'AbilityStart' on animation 'Surtr'sFury Full clip' has no receiver! Are you missing a component?
and the sound effects all play on wake for some reason
(click on picture to fully see it)
I've got no clue what receiver I'm supposed to be missing...
also this is the script
I'd honestly appreciate the help, I just started making my own animations yesterday for the first time
guyssss how i make this animation more soft by transition?or is ok?
Hello! I’m making a 2d game for class and i just finished the player code so they can dash but the animation isn’t quite triggering.
What's the best way of making cinematic scenes? Should I animate it in blender 3d and export as a mp4 video in unity or do you animate it in the unity engine intself?
You have actually four options
- and 2. animate in Unity or in Blender
A) and B) play back the cutscene in engine or as a video
All have pros and cons
Unity's animation tools are limited, but you can use Timeline component to sync any gameobject or component with the cutscene
Video files are large to store, but you can have the fidelity and effects that cannot be included or simulated in the game
Additionally in-game cinematics can adapt to better graphics hardware and larger monitors whereas videos cannot
You can also create cutscene animations in Blender, then with Unity's Timeline reuse and sync them with other gameobjects and components
Not enough for us to diagnose really
It could be that the isDashing parameter is not triggering, either by being triggered incorrectly or by the method not running
It could be that the PlayerDash2 clip doesn't have the correct motion, or is playing but imperceptibly for some reason
It could be that the transition to PlayerDash2 has a delay and never completes in time, or is interrupted by another transition
When presenting a problem with animation triggering try to include answers to these questions to start with
Usually doing that leads you to the solution already
Start at the top, often many are the same thing
Also, maybe a code channel would be better for this?
yeah it was a bunch of scripts from an irrlevent editor. 💀
Animation events don't support passing in parameters.
Which one would you recommend because I do agree that video files can increase the overall size of the game file.
They don't? I recall docs say
function called by an Animation Event also has the option to take one parameter. The parameter can be a float, string, int, or object reference, or an AnimationEvent object.
But I never tried that
Ah, yeah, you are right.
I have an IK rig on an animated character. The character is in an object pool and is disabled as soon as it is instantiated. When I re-enable it, why does the IK rig reset every value to 0?
Hi, im very noob, and i am importing animations from mixamo, (various walks) but my left toes keep pointing up.. does anyone know where i can see something pointing wrong.. im still finding my way around.. cant for the life of me find where to start. its always left toes.. imported a few different animations
Does it happen on your actual character, or just in the preview?
the character, consistently
Do you have the avatar's bones correctly configured?
Are there any warnings or errors in the animation importer?
does this look right?
where can i see that? im not sure what/where errors would be. just in the console? nothing there
In the animation import inspector for the asset, there are dropdowns for errors and warnings
ta, ill have a look, ill redo it
For example, this is what the settings are when the Enemy has been spawned but is currently disabled
As soon as it spawns
As far as I can tell, there aren't any other scripts that are affecting this component
How are you handling the pooling?
[System.Serializable]
public class Pool
{
public string tag;
public GameObject prefab;
public int size;
}
public static ObjectPooler_EnemySpawn Instance;
public List<Pool> pools;
public Dictionary<string, Queue<GameObject>> poolDictionary;
private void Awake()
{
Instance = this;
poolDictionary = new Dictionary<string, Queue<GameObject>>();
foreach (Pool pool in pools)
{
Queue<GameObject> objectPool = new Queue<GameObject>();
for (int i = 0; i < pool.size; i++)
{
GameObject obj = Instantiate(pool.prefab);
obj.SetActive(false);
objectPool.Enqueue(obj);
}
poolDictionary.Add(pool.tag, objectPool);
}
}
public GameObject SpawnFromPool(string tag, Vector3 position, Quaternion rotation)
{
if (!poolDictionary.ContainsKey(tag)) return null;
GameObject objectToSpawn = poolDictionary[tag].Dequeue();
objectToSpawn.transform.position = position;
objectToSpawn.transform.rotation = rotation;
objectToSpawn.SetActive(true);
IPooledObjects[] pooledObjs = objectToSpawn.GetComponents<IPooledObjects>();
for (int i = 0; i < pooledObjs.Length; i++)
{
if (pooledObjs[i] != null) pooledObjs[i].OnObjectSpawn();
}
poolDictionary[tag].Enqueue(objectToSpawn);
return objectToSpawn;
}
Tested it out as well with just Instantiating a new copy of the Gameobject and the problem persists
The problem doesn't happen when I manually place the Gameobject in the scene before Play though
so idk if this is some sort of Unity bug
or if it's a problem with the IK Rig system and instantiation
Also getting this warning
But it is
This is kinda goddamned frustrating because I can't even manually brute force the values after the spawn since for some reason, the source object weight is apparently not a variable
Thanks, I'll keep that in mind.
This issue still shouldn't be happening though, since I have no other script that even uses the Animation Rigging package
Wonder if it's a bug in 2021
Yeah, so I guess it is a Unity thing. When I switched the Animator Update mode to "Update Physics", the IK seems to work. But it didn't do that yesterday? At this point, I've already wasted like 4 hours on this thing...
i replied to the OP above, im having trouble with my toes.. these are the messages from the animation import inspector, i dont know if these apply to my problem.
i am using a blendtree for the walkfoward animation, but i deleted the blendtree and just used the animation, same result, wonky left foot
what else can i do to narrow down where the problem is? noob stuff
ive found a lead to my issue, i changed out the animator, and problem went away, ill follow that lead
'Changed out?'
why is it skipping frames?
i changed the animator from the animator i was using, to another animator i had there. and the walk was fine.. lol i havent realised what was different about them yet or why the different one works. ill tell you when i find it. #slowlearner
i was more trying to just change/eliminate things so i could get where the problem was.
i can see its the animations now, some are fine some arent.. i must be getting them from mixamo wrong, or whatevers going on, i cant seem to find the thing to see it lol.
I have a creature that grows limbs out of it's body. They look like tentacles but have a foot on the end. These can be damaged to that they detach at the joint and fall to the ground, with only the foot left on the ground.
The FBX from blender is a chain of bones. The hip is the root and the foot is the tip.
The growth animation is just some FK rotations and scale to have it 'grow' down to the ground.
When grown, I activate a 2 bone IK with the unity rigbuilder to control normal walking.
The problem I'm having is how to detach this limb and have it fall to the ground in a gross pile. I've tried:
Blender animation of it - but as it'a all FK animation, and the foot is on the tip, it's impossible to animate while keeping the foot still. I even tried to animate it with FK in blender not caring about the foot movements and rotations, and just do the opposite of the animation in unity, but I'm getting only feedback loops.
Activating rigidbodies and joints to the leg bones when it detaches - problem here is how glitchy it is. as each bone in in a chian of children bones, applying joints to them seems to break everything with the model going crazy and glitching out. I've tried clearing the parent of each bone in runtime, which world but I can't preserve world position for half the bones.
This seems like a stupid simple thing to do, I'm sure I'm missing something in unity that will jsut fix this - allow the ROOT bone of an armature to fall to the ground with physics while the tip is stuck in place
It is in fact a very hard thing to do 😛 It really depends on the specifics of what you want to do. The easiest, for physics or IK, would probably be to just instantiate a copy with the bone chain going the other way.
I would guess your transition to the roll animation is slow or delayed, so even when the character is upside down it's still being interpolated with the upright running animation
But you'd also have to check that the roll animation doesn't do that on its own without transitions
But there are dozens of competing ways to do a ragdolling tentacle.
hey i have a 3d model of a cupboard, how can i parent the knobs to the doors for animation?
(its a prefab fbx)
I don't know how to make the camera move towards a door and at a certain distance the door opens, I already have two animation clips, but I don't know how to make the camera start moving first and at a certain moment the door opens. open, this without finishing the camera animation
The most straightforward way would be to measure time when the camera is close enough, and add that as a delay to the door opening animation
They could also be controlled by the same animator to be animated together, or by a Timeline component if you have more things to sync with them
Or use a script to control them, where you can measure the distance of the camera explicitly, or create a method that's called by an animation event on the door animation
Many ways
Is there a timeline with animations? So you can control the different animations like the animator menu?
I'm messing with the timeline in unity to try to animate a camera. I have other animations created and blending but the camera wont record for me. I have attached an animation controller to the camera so the timeline can control it. When i go to animate it it puts down curves but no keyframe diamonds and then the animation i created doesnt work at all. Anyone have any idea whats happening?
Timeline is a component that can animate multiple entirely separate gameobjects in sync
https://learn.unity.com/tutorial/introduction-to-timeline-2019-3#
ok
lol literally what i posted about. i'll link u a vid to get started
@placid moat https://www.youtube.com/watch?v=w6lc8svzBms
Cut scenes complete a Game. The way to tell your story and drive the audience through the path of the game is via Cut scenes. In this video, we will create a cutscene in unity 3D using Timeline.
@agile solstice Why does it change in the timeline?
The door animation is fine, the camera animation is fine, I don't know why they go the other way in the timeline
This happens because a Timeline and an object's own Animator have different transforms as their origin
There was some way to convert them but the simplest way was to create new ones for the Timeline
I don't understand, I made the animations for the timeline, in the door that was already in the frame I rotated the pivot -110 degrees in y and the camera simply moves forward from where it was to a certain location
Aight after literal hours of troubleshooting it looks like resetting my unity layout to a default fixed my issue. 😭 😭 😭
Not sure what's happening
I had a similar problem only when using Animator-created clips with the Timeline
how so
I went through a tutorial and it was not brought up
and what does it do?
From what I hear mixamo, if you're using that, has some checkbox whether or not export with root motion
If you don't utilize it, you'll want animations without it
There might've been a way for the Humanoid configuration to negate the root motion separately if needed, but I'm not sure as I don't use Humanoids or mixamo
In my case it caused the transform offset issue you also saw, as I mentioned
How do I do that?
Do what?
Okay
I see
Adjust the transformations
I didn't say I had a solution, only that I got the same issue when trying to re-use Animator clips on the Timeline rather than creating new ones, though you said that wasn't what you did
There was some way of converting the clips, but I do not remember it
I discovered position and rotation adjustments when editing an animation in the timeline
Could you solve it? My camera doesn't show me anything.
Make sure it's the only active camera in the scene and make sure you have it selected?
is the only one
Hmm I'm afraid I'm not going to be much help
ok
Hey can someone help me make this loop perfectly without the step? I have a walk animation with root motion and want him to go forward, but because of this curve, the model always snaps back to his starting position!
You're not using root motion if that happens
Even if the animation is
Has anyone done procedural animation for torso and a pistol? Im trying to create an fps
I discovered a very nice fix for position change issue , when blending 2 root motion animations ,
In animation inspector Panel,
Unity has XZ position baking options combined so u cant even bake only X or Z individually ,
but RigidBody has greater preference than root motions , u can lock X or Y position of character individually in Rigidbody component,
and your start and end position will be same in that particular axis where animations plays in between.
In simple words u lock any transform and deny root motion to change it .
Probably becuase you don't have an object selected in your scene that is using this animator?
translation from Brazilian Portuguese to English: """fuck N-word""" WTF BRO 💀 💀
What are you talking about? If you haven't noticed, it's Spanish.
lol
Hi, i have a problem i can't add frames to my animation :/
Here's a little video to show the problem
it just don't do anything when i click on the SpriteRenderer Option
I need help please I made a Object "CatArm" to Put it inside the "TrashBin" I tested in Black Bin, but the Animation played and I didn't even Drag the Collider close to the Trash Bin can someone hep me with that its for final Project of my study and I most deliver it tomorrow evening
!help
@shrewd zodiac im bring it over here
ive never used Crossfade()
So I'm not sure if I'm missing something
so i dont know what that would do tbh
i just change the bools of the Animator and I let it handle its own transitions
w/ the settings i have set up in the inspectors of those animator clips
Fades in the animation with the name animation over a period of time defined by fadeLength
well it might be code tbh.
why wouldnt u just let the Animator handle all that stuff
from what i understand its better than trying to manage clips individually
Becomes a web and it gets very tangled
All I have to do with this is call it like playing a normal animation
hang on.. let me grab that code
public class AnimationHandler : MonoBehaviour
{
public Animator ani;
public void PlayAnimation(string aniName, bool isInteracting, bool rootMotion, float speed)
{
ani.applyRootMotion = rootMotion;
ani.SetBool("IsInteracting", isInteracting);
ani.CrossFade(aniName, speed);
}
}```
soo what is the speed? what do u pass thru that function for the from Block -> Attack swap
.01 u say? or was that in the animator?
aniHandle.PlayAnimation("Attack1", true, true, 0.2f);
input.bufferAttack.Clear();
input.bufferTimerAttack.Clear();
see, its confusing to me.. b/c what do u do with the animator component? do just have ur clips sitting in there?
w/o any transitions or parameters set up?
I can call them the same as ani.Play
But it just smooths them out
so it doesn't have to jump
and whats the inspector on the transition from Blocking look like?
wat happens when u set that duration to 0?
Transition Duration
i think its slowed down b/c it has to go from blocking back to empty and then to attack
rather than straight from blocking to attack
It doesn't go to empty at all
It goes to attack directly
well, whats that transition arrow for?
To make sure you go back to idle anim
after you're not blocking
which is why there's a transition
yea, but im thinking.. if ur already playing blocking.. and then u aren't. Wouldn't that transition go from blocking into empty as ur setting it to play the next clip [attacking]
if it has no parameter attached to it.. (like telling it when to go) it'll just happen but that may be only if blocking has exit time
It pauses the blocking animation and starts the attacking animation
But it doesn't pause any other animation?
the rest fade normally
ya, idk man i can't say ive ever seen one set up as this.. where u have conditionals in the animator and along with manually calling it in code so not sure i can help figure that one out. and tbh this may actually go back in coding-beginner section cuz it may be a coding error after all..
I think I can just make the crossfade faster?
I just Re-Up that problem, please someone
Not certain which channel to post this in, but I'm curious about using the Sprite Skin component and having it also deform child objects attached to it. I have the sprite itself deforming how I want it, but of course other sprites seem to be unaffected.
The check itself in this instance (seen on left in heirarchy) has the skin component, and is deforming properly. the children objects (represented by Timer, Profile, etc above Bones) do not deform with it.
I can achieve a portion of the effect by parenting certain elements to certain bones
I used a cloth-style bone structure so maybe that's also an issue
Perhaps equipping the elements with spring joints and connecting them to the bones would do it?
This behavior is quite complex and maybe not worth it haha
I add the scipt and animation clips and everyhing but something wrong with script or animator help please
script:
using UnityEngine;
public class BinInteraction : MonoBehaviour
{
public AudioClip matchSound; // Set this in the inspector for the match sound
public AudioClip wrongSound; // Set this in the inspector for the wrong sound
private Animator animator; // Reference to the Animator component
private AudioSource audioSource; // Reference to the AudioSource componentprivate void Start() { // Get the Animator and AudioSource components animator = GetComponent<Animator>(); audioSource = GetComponent<AudioSource>(); } private void OnTriggerEnter2D(Collider2D collision) { if (collision.gameObject.CompareTag(gameObject.tag)) { // Set "isOpen" to true when an object enters the bin's collider animator.SetBool("isOpen", true); audioSource.PlayOneShot(matchSound); // Hide the object collision.gameObject.SetActive(false); } else { // Play the wrong sound when the tags don't match audioSource.PlayOneShot(wrongSound); // Hide the object collision.gameObject.SetActive(false); } } private void OnTriggerExit2D(Collider2D collision) { if (collision.gameObject.CompareTag(gameObject.tag)) { // Set "isOpen" to false when the object exits the bin's collider animator.SetBool("isOpen", false); } }}
Hello, anyone know the solution for this ?
I'd render all the child elements to a texture and apply that to the deforming sprite.
Interesting, I was thinking about that. You're talking about using a camera to create a render texture, then using that instead of a Sprite Renderer to deform a mesh with the projected texture?
I assume that would work, but I was thinking it might be more performance intensive than is worth it for such a small effect.
You can still use a skinned sprite renderer with render textures.
Oh neat. Okay. I'll have to look into how to go about it then. Are they GPU intense or is the hit minimal?
I won't have more than 6 of these on screen at a time.
And it should be fairly trivial performance wise, especially if you only update the texture when the data changes.
It is just a couple of sprites and some text that the camera needs to render, and not even every frame.
Very true. Do you have any good resources or should I just take a look at the Unity references?
Actually, Unity had a spotlight video recently of another game that uses a similar technique on their YouTube channel.
Their implementation is probably way more than you need but you can see it in action.
Nice. Awesome. I'll write down what you suggested and give it a go a bit later after some of my other tasks.
Thanks @hybrid tinsel
This was just a funky idea I had to try and make some of my UI more diagetic. I had it on an overlay before and thought it might be fun to have crumple-able guest checks
I might go back to the overlay implementation but this seems like a fun distraction
I actually uee a similar technique for various things; it is very versatile and allows for using all sorts of shader tricks on combined sprite meshes.
(It is how I do lighting on rigged 2d characters, for instance)
here's the side-by-side
The left one is a bit more functional but less in-world. We have so little overlay UI already that I figured switching to a diagetic item is worth exploring.
I love complex lighting in 2D games. Really polishes up the visuals.
I've tried handpainting sprite normals using aseprite and it's fun to work with.
I'm really not a graphics guy so most of this is just exploratory but it's one of those skills I'd like to round out 🙏
That's really neat! I like the 'cards as ingredients' thing too.
haha thanks. I won't advertise here but I'll ping you when I try the render texture and post a progress gif 🙏 working on some of the backend system stuff before getting back to some more UX
And I don't even use a normal map on my 2d characters generally; it doesn't tend to look '2d' enough on a cartoon style. Though I've been experimenting a lot with styles.
But being able to have a rigged sprite that acts like a single texture is useful for all sorts of effects. 😄
Like here where I used it to combine multiple sprites and particles together for the effect
That looks awesome!
Thanks! Some day I really wanna go back and finish that, but so much work, so little time...
From a technical standpoint the arm was the hardest part, but that still leaves all the tedious boring parts of rigging and animation.
WHY ISNT IT WORKING!!!
i just watched a tutorial on how to import mixamo animations but they arent actually playing on the player
how do i fucking do this bro
like the character keeps t posing
What is the avatar type?
wdym
i think i found the issue but i have no idea how to fix it
this is the tutorial i used
https://www.youtube.com/watch?v=bSL0sNZ4Kqw&ab_channel=Dxura
There are probably better ways to go about this, but this is the method that works best for me. The other videos I've seen have you importing the character multiple types and never extracting the motion. This video shows you how to export the motion and keep your folders nice and clean.
https://gyazo.com/98d77951a74452a73502c4033516b657
Any ideas why I cant change the offset? Its stuck at -30
I created a render texture, and a camera to output to it, added the UI elements to a canvas and pointed the camera at the canvas. I added a RawImage component to the same object as the Skinned Sprite. What other steps are there?
What's the rawimage for?
I assumed I might need it for applying the render texture
Nope. You can apply it directly to the sprite renderer
The camera can be whatever you want
You'll want to change the material to change the texture. You'll probably want to use a different shader for it.
The actual 'sprite' in the renderer is required to not break the skinning I believe.
I guess I'm having trouble with getting the render texture into the sprite renderer. I applied the render texture as the main texture for a material and then slotted that into the material of the sprite renderer, but the sprite renderer is only rendering the sprite component
sprite toon 2 in this instance is a Sprite Shaders Ultimate material with the Main Tex as the render texture
Like I said, you'll need a different material. By default, sprite renderers replace _MainTex in any shader with the sprite image.
So you'll want a shader that doesn't use _MainTex as its main input to use a render texture
Figured it out!
Now we have a somewhat realistic paper crumpling effect 😄
Thanks a ton @hybrid tinsel
I assume if I want more of them I should just duplicate the Material and Render Texture, and will need a finite number.
Awesome!
Technically, you'll only need as many as will be on screen at once.
can someone help. why when it switches from walking to idle it keeps teleporting away??
the white bean is where the enemy model SHOULD be
Animation is authored for root motion but you're not using root motion
Ok thank you :)
I used timeline to put together some animations into a chained combo. They all needed to have theri in and out times adjusted, to make the clips better match each other.
How do I set the precise in - out times of each clip in either the animation controller or on the actual clip (i actually want to trim or split the clips) ?
You can set it directly in timeline with clip in and out
I used Timeline to explore and tweak these ins/outs - I now need to get these edits to the clips that the animator controller will be using
i animated the alpha of an UI Image, in the animation in scene it looks fine, in play mode its just a white bar
Hey y'all not sure if this is the right Text Channel for discussing about In-Game Cutscenes, but i'm curious how do some AAA and Indie Animators animate these cutscenes in game? Do they animate the models with the level mesh in a modelling software or animate the model with a rig in their choice of Game Engine?
The opening cutscene for the Orowyrm boss fight in the Duviri Paradox update for Warframe.
Game engines are not usually used by artists as they don't include the necessary tools
Not for the work itself, I mean, they do utilize the engine when implementing the work
If they need specialized in-house tools or workflows, they might choose to create them to be usable within their game engine*, but that's increasingly rare as modeling and animation tools have grown so complex
Hmmm okay? But how they make it tho in their workflow? Do they make the level model and character model and then export it to the game engine? or Make a level with probuilder in the Game Engine then export it to Blender and add the character in that file then animate and then export it to the game engine?
That varies by production and doesn't practically matter
If the animator needs a mesh of a level or any object for a character to interact with during a cutscene, then the animator would grab the source file of that asset, or have it exported for their use if it was created procedurally with in-engine tools
Either way they have the mesh asset to use in their animation
Technically there's nothing wrong with doing all that stuff in the engine without exporting it out, it's just not really done in reality
ProBuilder isn't robust enough to do much more than temporary greybox levels, and Unity's animation tools aren't robust enough for animating more than a couple of transforms at a time
Thanks for the answer Spazi, i'm surprised now after reading that. In-Game cutscene must be a complicated work then.
There's a lot that can go into cutscenes if you want to make them fancy
In the one you linked there was character motion that was mocapped just for that purpose, and the exploding wall that was likely simulated and baked in a wholly another program
In the older days it used to be that tool suites for making simulations and animations were really sophisticated, but getting them into engines was not
So because of that you often saw cutscenes that avoided interacting much with the game's levels or systems, so they could be more easily authored elsewhere and plopped into the game
That was back when it was still more common for studios to build in-engine cutscene tools to make it easier
The custom tools lost the race to the professional proprietary tools, and over the years studios have gotten really good at making stuff seamless
In new triple-A games like God of War for example it seems as if anything is possible with characters breaking environments and interacting with any and all objects in an authentic way, and a lot of research and work has gone into making that possible
Still, you can get by doing a whole lot less than they do
You can tell a lot of stories without accurately simulating how bread tears as it's bitten into
Interesting, when you said the about wall explosion part of that cutscene i've linked, it's make senses really if it was animated in a 3D Program or Maya for AAA Modellers and Animators. Is there a video about these topics and different topics too about Game Dev Workflows, how they make it?
On the triple-A level currently I think Maya is still the king of animation, and Houdini is the tool of choice for simulations and procedural modeling
There's more for various more niche tasks but I'm not actively keeping track
If you snoop around for what programs big studios ask you to know before applying for a job, or what pro cinematic artists boast on their pages, that should give a pretty clear picture
Workflows are a whole world of topics, even if you were to stick to just triple-As or indies
Maybe the best resource would be to search around the GDC talks: https://www.youtube.com/@Gdconf/videos
They have a lot of pro artists of all types there explaining how they do things
is there much I can do to avoid the spaghetti or do unity animators just end up looking like this eventually
Animator has many features that tutorials neglect to mention
The key is knowing what they are and using them strategically
The best setup varies by project, but there are some logical systems you can often build
Namely if you have states that often must run in sequence or can be grouped, I'd use a Sub State Machine, here for Jump Loop > Fall > Fall Loop > Land
Movement is often good to have in a blend tree, if you want blending, or on another animation Layer
Oh yeah, for context I'm animating sprites, so there won't necessarily be any overlap in the animation. I haven't used/looked into sub state machines too much yet, Ill make sure to give them a look.
You won't get the benefits of blending with them, but blend trees and layers are still useful for categorizing animation clips to make transitioning to them less arduous
Re-explain your problem though
the f was my problem
oh yeah it was:
player starts running at start (for 0.25sec)
idle statefor the rest of the game
jumping animation wont occur
running animation wont occur
I should probably re organize theese screenshots
wait a sec
its too much
There were no clues of any error in the screenshots
On the base layer? (Which seems to be cropped out)
for real?
you mean the screenshot in movement?
@obsidian swan You can select your gameobject with the animator during play mode to see the status of the parameters, states and transitions
This will give you an idea of where the animator is stuck and if the parameters are getting set properly
that doesnt work. we tried before a thousand times
It wont show anything
It will still look like these
With my gameobject animator is attached to selected
Which unity version is this?
You also had transparent animator states in one screenshot, which is weird
I still dont know why thats weird
isnt it normal since I go into play mode?
Is there a reason your Jumping layer include states also for idle, walk and run
I've never seen that
And doesn't happen on 2021 unity right now
yeah they are supposed to be there
I'm asking which layer you are talking about when you say Idle, jumping, running etc
the animator is fine. Ive used this before
everything here should be fine yet it doesnt work
That doesn't sound right
from idle to standing jump jump b from walk to jump jump trig
if (Input.GetKeyDown(KeyCode.Space) && playerIsOnGround)
{
playerAnimation.SetTrigger("Jump_trig");
}
}
But what layer are you looking at
which is on my code
jumping
The idea of layers is that they include different states from each other, and particularly from the base layer
Duplicating them is redundant, especially since you can do blending with layer weights
Playmode view seems to be working fine here
yes
hence why that was the first thing i sent here
jumping doesnt work
it was
head
if you ask that
well Im not an expert at animation stuff
I wonder if Death being at full weight will stop the layer before it (Jumping) from animating at all.
@agile solstice Do you know if that's the case?
Well, the first screenshot seems to be showing that each of your layers has full weight, which doesn't make sense for this situation
It will definitely stop the Jumping layer from affecting anything. But I'm not sure if it should still run and display normally while playing
@agile solsticemaybe you can take a look at the project?
here was the screenshot
when gameobject was selected
and its like this
still like this
What if you set Death weight to 0
This is probably what's happening
so how do I fix?
What if you set Death weight to 0
ummmm how may I ask
(unless a script is controlling the weight)
playerAnimation.SetBool("Death_b", true);
playerAnimation.SetInteger("DeathType_int", 1);
playerAnimation.SetTrigger("Jump_trig");
I only have these in terms of controlling the cringe animation stuff
Mass or mask?
Why are you talking about that?
Ah
Why?
I kinda failed phsyics when I was in highschool still dont know the difference betweeh weight and mass
I donr know if they are related or smthing
Layer weight in the animator
ok
hmmm so this is how its supposed to look like
long time no see
we did the hard part
Im really burned out can you also quickly tell me how to make it run now
jumping is wroking now
Doesn't seem that we can
I set that to 0
Ok. So Death was overriding it completely because it had the same mask (no mask), and had a full weight, and it was after the Jumping layer
You didn't encounter a Unity bug like you insisted, you just didn't learn the system
why doesnt it go from this to this tho even thou I have this playerAnimation.SetTrigger("Jump_trig");
well I dont know man. It worked fine default settings before
Could be the wrong layer, since you have so many duplicates
I didnt use to have to change anything
I can't take your word for that since you didn't know layer weights exist
You can't practically troubleshoot the animator if you don't know the first thing about it
Here's how it works, in chapters: https://youtu.be/sgHicuJAu3g?t=1057
Here's how layers and masks work: https://youtu.be/W0eRZGS6dhQ
Don't work when burned out
thanks. I think Im now qualified to work at disney. no man can endure cringe animation problems for so long but me
I didnt use to learn anything about animation because it was working fine but what are you gonna do
You don't have to know about cars either until yours breaks in the desert
I actually hate youtube tutorials. do you mind me sending docs (or text based learning stuff) instead? like visually filled. I found these ones are these good?
https://docs.unity3d.com/ScriptReference/LayerMask.html
https://docs.unity3d.com/ScriptReference/Animator.html
https://docs.unity3d.com/Manual/class-AnimatorController.html