#šāanimation
1 messages Ā· Page 18 of 1
You would usually set that sorting in the sprite editor, because it is per-triangle. You can also use sorting groups on the sprite itself if the legs are separated into different sprites.
Where exactly in the sprite editor?
Does anyone have a walk strafe right/left human animation that is compatible with mixamo rig?
I need it very much
Doesn't mixamo have those?
bottom right corner when editing bones
i saw 2 of them but they are not good
He needs something like legs interlacing
and I have something like it but im not good at animations editing so im asking if someone have those anims or maybe can edit it for me
need something like this but less arms movement and bigger steps
this anim is way too slow and when I modify keyframes, anim is not the same but it looks like some demonic character is trying to kidnap him
just the entire animation is not playing correctly and it is not armature's fault
ok thanks. guess I have to try it out then š
I'm using the starter asset pack tpp setup and I'm having a problem where my character "ducks" mid air because it starts playing the jump start anim midair. It looks like it's because I jump durung the landing animation and while in air the landing => walk transition finishes and start jump starts too late. I tried adding another transition directly from land to start, but even with it there's a time, when I can see on the graph that the highlight goes along the transition from land to walk, how do I eliminate that?
(I was playing around and I think setting interruption source to "next state" fixes my issue. need to read up on what it does)
you need to have a valid instanced object selected
Then you must first learn the basics by through the docs and tutorials
https://docs.unity3d.com/Manual/AnimationSection.html
https://youtu.be/sgHicuJAu3g
the thing is im watching a tutorial on how to make a game but when i follow the guide it doesnt show the samples like it does on the video
well it doesnt show the samples in my editor
As Fogsight said you must have selected a valid object
how do i do that?
Meaning a gameobject that has the Animator with the clip
How do you select a gameobject?
Perhaps you should look into basic Unity tutorials, not Animation
Or just retrace your steps through the tutorial you're doing
You should at least be familiar with the concept of gameobjects and selecting, first
ok ill try
can you try explain bcs i followed the tutorial perfectly
but for some reason it isnt showing
hold on i watched a small unity tutorial about it and found it was just an error in the animation window
so i had to edit the settings and its there now
thanks for your help
Study the docs and the guides
You need to have enough of a grasp on the basics to be able to follow our advice
Otherwise it's a bit pointless to advise
Hey guys, is there any way I can check if one animation on one object matches an animation on another object?
For example I have a system where I use the user's input to create an animation (MoCap or VR full body) and I want it so that the user poses like an animation already present in the system.
Is there a way I can check if those two animations are a match?
It's very difficult to programmatically compare animations per se, but you can animate an invisible character parallel to the player's body and compare their limb transform positions and rotations
I did write a script for that, I have used a threshold for each axes however it seems like the rotation calculations might be off sometimes since the same rotation can be represented using two angles, is there a way to tackle that?
If you don't need to know the orientation of the rotation difference, then you could simply get the dot product of their forward vectors
Anyone has this strange bug in the Rigging editor where you cannot select any existing bone? If I click and drag there is a box that goes to the top right, but I canāt actually select bones š
it somehow resets itself to 1
if anyone knows what may cause that please let me know
You're in 2022.3. LTS?
Yes, I fixed it by upgrading to the beta š°
Tech streams are always tricky to work in, but 2022.3. really has many issues that the recent patch didn't fix
Sprite editor did work in 2022.3.2f1 but not after that
Maybe anyone knows any turorial or material about Animating over splines? What I want to do, is spawn 10 objects and line them up via spline.
How ever the information what I find, either how to spawn 10 objects without animating (aka how end animation would look like), or animate one object via spline but always until the end of the spline.
Any material would be greatly appreciated
.
I need some help. I want to trigger multiple animators on one trigger, but i do not know how to do it
Im using animation rigging ik for the arms in my fps. It works great but when rotating the camera the hands delay behind the taget
nvm
I ask myself the question but which script makes it possible to make a tail simulation in Animation Rigging?
Damped Transform kind of, but not very well
https://docs.unity3d.com/Packages/com.unity.animation.rigging@1.3/manual/constraints/DampedTransform.html
You will want some custom system for it
Thanks, i wil try it !
Atually, still need an answer to this. I thought I found a work around but It wasn't that good
how can i make the animations in unity less smooth? I want the animations to be instant. no transitions. to make pixelated characters animation look nice
Guys i have a gun model with some animations i made in blender, and i made a parent for it so i can change its position.. But idk whats hapenning it keeps changing position to another point
not in game
in game
Is there a way to play walking animation on legs only? I thought you did this with layers and avatar masks but its not doing anything?
Does it happen when the idle animation starts?
would this animation be hard to make in unity (i“m a beginner)?
my shooting animation doesn't play. ppl in #š»ācode-beginner said my code doesn't have issues so ig imma ask in here. I'm pretty sure the transitions are workign since the arrows are turning blue when i shoot, and the little loading bar also works. the shooting animation just doesn't play in play mode.
probably not that hard. 20 minutes?
have you got a good tutorial on the basics to do that?
uhhh not really, sorry. i took a unity course. if you have the money for it i suggest you do the same, it helped me a lot
i try to move the bones but it makes this blue highlight how can i fix that?
i also cant parent bones
same problem like this https://forum.unity.com/threads/blue-box-in-sprite-editor-normal-functionality-messed.1460791/
2022.3. LTS has a lot of problems, nothing much to do about it
I think 2022.3.2f1 has the least issues so you could try that
Otherwise you'll have to swap major versions to either 2021.3. LTS or to 2023.1. tech stream
Always use version control or otherwise make backups when downgrading or upgrading the project
why are his legs like that
thanks, the 2022.3.2f1 works
the animation seem to bug out, why
has anyone got a tutorial on animate that or a tutorial on how to animate in first person (in unity or blender)?
I have some weird things going on with my animation, my character can't walk or move if I change the animation he uses. What would be the reason for this?
If your Animator has states controlling the player's Transform position, then it will completely override it
The visuals of your objects, including animated character meshes should be parented under the gameobject that controls movement
Oh, so if the animation controls his position, he won't be able to move?
Indeed
But removing the transform might make the animation not work correctly.
I'm not sure what you mean by that
The Animator and the character's model can be on a child gameobject to the character's logic components
Do I put it on his bones or his mesh?
No
You could move the whole shebang to be a child under another gameobject which would get all the logic parts like colliders and movement
The hierarchy relations of bones, mesh and Animator should not change if the animations are imported
But you can change their hierarchy position together relative to everything else, by moving everything else relative to them
This is the structre right now, "Armature" is his bones and everything else is his mesh. The parent that contains all the data doesn't have mesh or bones or anything. I don't get what moving it would do.
Is this okay or what should I do.
Well, the mesh will require bones at a specific hierarchy position to work, and so will the animator
You can't move those three relative to each other without breaking stuff, but you won't have to
If your Animator was on your character gameobject that also had logic components meaning colliders, movement, input, whatever, and prevented it from moving, then you only need to create an empty parent for the Animator gameobject and move every logic component to that empty
So I need to create a new object that contains all his data and the animator and input?
Your character would have all necessary components on its gameobject, except the animator
The animator would be on a child gameobject, together with mesh and bones
The mesh and bones would have to be children of my new object?
No, they should be under the Animator gameobject exactly as they were
That relationship cannot be changed
They can't, unity won't allow the main parent to not have the animator.
Should the new object house the animator and nothing else?
Won't allow? That doesn't sound right
Yeah, the script i'm using forces it to need to be the highest object I guess.
What script?
This is what it keeps telling me.
I don't know what components you are using or what specific setups they require
It could be intended to be used with root motion which to my knowledge doesn't override the root transform position entirely
I'm using this: https://assetstore.unity.com/packages/templates/systems/3rd-person-controller-fly-mode-28647
if i have an animation that moves both arms, and an animation that moves only one arm, can i have the seperately moved arm ignore the animation that's moving both arms?
Is there anything that negatively sticks out from this stabbing animation?
why is every ANIMATION BUGGED
You have not given any information to work with
Where the animations are from, for example
ripped em from the titanfall 2 game
but animations from mixamo bug out too
from every model
We can't help you with ripping problems here
The rigs look too different to work with human animations anyway
Guys i have a gun model with some animations i made in blender, and i made a parent for it so i can change its position.. But idk whats hapenning it keeps changing position to another point
not in game
in game
Hey guys, is it possible to extract proper eulerAngles for each axes for an armature rotation? For example, I have this right arm here
When I rotate it on the x-axis, the other two axis y & z seem to enter a gimbal lock which makes it difficult to determine which axis is actually rotation it forward
Should i try and rig my 2d character that's always standing still or is there an easier way to do this asides from rigging? I'd like for it to play a random animation if the player clicks on it, upon clicking id like to have a sort of retaliation effect where the hands torso head legs etc. move slightly.
When I import an animation from my Blender model into Unity, it does this weird jitter a couple times. This only happens when I use the avatar I created when importing the arm mesh. When I just import it and just leave it as it is, it works fine.
I'm importing an animation in a separate file from the base mesh
How would I use that?
You'd want to first research what root motion exactly is
Then how Unity deals with it
The thing is, I need the character to be able to move. He needs those extra transforms on his animation so all his bones will move. Is there some way it can move those transform positions relatively as he moves?
anybody have an idea as to why the animations just stop working after importing the animation from blender into unity? everything worked perfectly up to the point where i imported the shooting/gun animations into unity and the slide doesn't move back in preview mode nor play mode. The code has no errors, I've checked with multiple people
gun just stays in the idle pose permanantly
a very simple question yall I am sure...is there any way to remove a read-only attribute from an animation? I have an asset I imported from the Unity store, but there are not colliders and I wanted to animate one with it
Duplicate it with ctrl + D in the project window and you'll get a clip that can be modified
The read-only one is embedded in the imported mesh asset and can only be changed through mesh import settings
hi guys, do you know how can I replace the Animator Override Controller so that it becomes the default controller with the displayed animations in it?
Controller and Override Controller are different assets for different purposes, I don't think you can really transmute one into another
Why not simply use the Override Controller you have?
Why is it that when I insert an animator controller into the animator, the character half falls under the platform?
without animator controller
It either has no animation to play or the animation is not Humanoid-compatible
in my animator controller, my shooting animation is only halfway playing? I know it's not the animation itself, as it looks fine outside of the animator.
ok so it looks like if I set the animation to loop, it plays fully on the second loop
It could be that your transition to shooting has a duration that takes up a part of the animation
If you're working with sprites, transition blends will not show at all, and only the sprite with the most influence will be displayed
I'm doing this in 3d, could the script used to play the animation be the issue? I'd assume not as I can tell it's wrong in the animator preview window
I have fixed it
What did you find?
I had transition duration set to 0.75, which my animations don't need
You may be thinking of humanoid avatar configuration
im not sure
this thing
i dont know why but sometimes when i jump up and land on that platform the jump animation dont transition to fall then to idle or running
nvm i found out the problem it was the ground check
pretty cool animation actually... since you asked for critique though.. i find the head movement (first person camera) to be a little jarring -- could be your intention, idk
WHY DOES THE ANIMATOR KEEP RESETTING
i make some transitions, save it, open the project again and everything is gone
including the parameters
Every once in a while, these animated characters' hand bones will snap to this strange position, and I have no idea what the problem is.
No animation that I have has the bones set to these position, not even in the model's default pose. At no point in my code am I manually setting bone positions. Has anyone else ever encountered this?
I don't even know what context would even be relevant. Animator settings? Layer settings? Animation data?
@solar cometuncheck "has exit time" in the PlayerWalk->Idle transition
Do your animations have any import errors? It could be a euler/quaternion conversion issue in the import, or a problem with interpolating between animations.
Is the flipping of the bones visible when viewing the animations in the animation editor?
Or only in play mode?
those idle animations are either 1 or 2 frames in duration, so I'm skeptical of import error. I'll check again later, but they seem to play only in play mode
It seems to happen regardless of the current animation. I only showed idle animations, but you can see it happens regardless of clip
If the animations are shorter than the transitions between them, that could be causing issues.
animation play properly when game isnt running but dosent when game is running
i also got no idea what this is the forums dont know either it seems
do you have old animation behaviors attached to your clips?
also, there's a chance a script is interfering
weird thing is there is one on the other side of the platform and that one worked properly and it was coppy and pasted only thing changed was the transform but now both dont animate properly after i reastarted the editor
i turned off everything ecept the animator in the inspector and its the same
ima test it in a blank scene
yeah it does it too in a new scene
yeah i reanimated it and the left doors still dont move when scene is playing
oh im an idiot
the mesh was set to static for some reason
thanks probuilder combine mesh button
Hello, i'm having some trouble using Mixamo animations on a model. This is the model, but when I give him any kind of animation he adopts a weird position
In mixamo works fine, but the real fbx cannot have any animations
Somebody knows what to do?
I can get the same position while in Muscles & Settings tab, but i don't know if that means something

This suggests the animations are not humanoid-compatible
That's the default pose when there is no animation or it can't be displayed for whichever reason
is there any Character rig animation (Character rig package) basic tutorials from some site or youtube?
And I don't know much animation and animator. I want to learn basics of Animation and Animator.
Does anyone know how to transition smoothly between animator layers? I canāt find a way to blend it
How can i make a character who has apply root motiom move along platforms as child? Or any other method??
How do I animate the parameter that is a float with curves? All I see is keyframes on the animation timeline.
I think you probably can't
But you perhaps could store multiple curves in a script an lerp between them using property or properties that you can keyframe
Why do you need to?
I just want to have very specific acceleration/easing camera which follows the path. The path values are 0-1, and I kind of need precise curve handle tweaking to achieve that easing.
It is on cinemachine track. I am fairly new to animation in unity.
I can definitely remap my linear keyframe on some new curve component.
I just don't know the workflow
Animations themselves can map any keyframed property to a curve, or multiple if blending between animations
Our feature artist/tutorial today is this set of 10 PRINCIPALS of MOTION DESIGN/ANIMATION by the talented @jrcanest! Such a great reference, beautifully clear, and MASSIVELY USEFUL for all types of ANIMATION! #animation #animationdev #anime #gamedev #conceptart #motiongraphics
1745
374
low poly link
help NONE of my gun animations work ive been stuck on this for at least 2 weeks now, they work fine in blender but nothing works at all when i import them into unity š
doesnt show any animations when pressing play in the preview window either
BEST PRACTICE FOR SYNCING ATTACKS WITH ANIMATION?
In fighting games, you can divide an attack's frame data in three stages:
a) Startup: The time until the attack's hitbox activates
b) Active: The time the hitbox is enabled and remains active
c) Recovery: The time it takes the character to return to idle
So far i've been coding the attacks for my 2D characters using a scriptable object to define an attack's frame data, and a timer to trigger each phase, using the scriptable object's values. In this case, animation is not really tied to the attack's mechanics, and syncing must be done with manual measurements.
However, I recently discovered Animation Events, and those can be used to trigger the hitbox and other relevant events from the animation itself. And so, to change the durations of each phase of an attack, you must move around the frame order.
I'm just starting with this system, working on simple attacks. Both seem to work fine, however, would you say using Animation Events is a much better way to go?
Hey, is there any way to call a function when a property is changed inside an animation key? For example, I have created this custom script and I set its "Mask" property on an animation. I would like to automatically send the mask property to the material once its value is changed on a key. Is there any way to do that?
I.E as if this property was set in code
You can use animation events, or you can actually keyframe the hit boxes.
what would 'keyframing' be? :x
Um, you know how animations work in general, using keyframes? You can add keyframes for nearly anything that can be serializedm including hitboxes.
Any improvemetns I could make
open it in preview since the tape on one of the frames blends in with discord
I have an animation where the gameobject's Z rotation is set to a specific value (steady throughout the entire animation). When I reset it, though (setting the bool parameter to false), the rotation seems to be kept during other animations (which don't change the rotation). Isn't the rotation supposed to be reset since the animation is over? What's going on?
Is there anyway with the AnimatorController to make a transition only fire if enough time has passed?
IE:
A->B, if condition is met (someVar == someVal)
A->C, if just enough time has passed sitting in the A state
Basically I am setting up an attack combo system (purely visual, each attack does the same thing) but Id like to make it such that they go back to idle if they dont continue to be in the attack state
Also is there any better way to browse this menu at all? Any other way I can select specific animations?
I have over 100 animations for my character, scrolling through this list is agonizing >_>;
I imported this PSD character to Unity, and it looks bad in Unity:
while it's ok on gimp
why?
Set filter mode to point no filter and compression to none
Unity has three official IK tools, one of which is built in(mecanim IK) and two of which are in packages (animation rigging package and 2d rigging package)
Add a timer to your script and have it send a second variable to the animator?
when i import animations on armature, all bones have keyframes even those which arent actually animated in blender
how to do this to clear that thing? this destroys my car animator xD
maybe idk some export function in blender or import in unity? something easier than manual clean up
"with the animator controller" was the key part, I wanted to sanity check Im not re-inventing the wheel if I do it with a script, if the animator has a way to do such a thing already built in
Well, technically if you have a second transition with an exit time, that can work. If I understand what you're trying to do.
thank you
No to both for the built-in, but yes for the other two.
While using the animation window or timeline, by default.
also if youre going to make a game with pixel art i suggest you look up presets
change the sprite to full rect
The skinning editor isn't really designed with pixel art in mind. You can just edit the shapes though.
Lets say I wanted a 0.5s "grace window" for where it will switch from A->B if the conditions are met (and A has completed and is "waiting"), but then if 0.5s is up it will auto swap A->C instead
What would that look like?
I wonder if i should ask about DoTween here
Anyone familiar with DoPunch? In my experience it's not affected by SetEase? Altho nothing says that in the docs
How would one edit the ease for DoPunch then?
Hi folks,
Does anyone know to to export .anim to FBX ?
I've tried FBX RECORDER, but the result is totally broken :/
hello guys, I wonder if there's a way change the default unity rotation space from local to something else. I have 2 animation layers, one for upper body another for the lower body, and the hip bone rotates the spine a lot, I need to stabilize it
Are you counting that .5s from the start of the state, or...?
end of animation A
i have an animation controller and a script setup to control the animations that play when an enemy detects a player, the problem is that the animations aren't playing and I dont know why. If anyone could help me out, here's my setup:
{
enemyAnimator = GetComponent<Animator>();
enemyAnimator.SetBool("IsIdle", true);
}
// Update is called once per frame
void Update()
{
if (FOV.canSeePlayer)
{
enemyAnimator.SetBool("IsIdle", false);
enemyAnimator.SetBool("IsWalking", true);
}
else if (!FOV.canSeePlayer)
{
enemyAnimator.SetBool("IsWalking", false);
enemyAnimator.SetBool("IsIdle", true);
}
}```
51235
Do you have the object selected in the scene view?
Or did you just select the animation from the project files
Do you have conditions set on the transitions? And is your if statement actually triggering at all?
yes and yes, also the problem has evolved quite a lot since i posted
let me pull up the project
@hybrid tinsel right now my gunner has an animator with the controller and avatar assigned, but the problem is that animations aren't playing even if the controller says they are. I checked the controller while running the game and it showed that the animations were definitely being triggered
the animation is also being played in the component editor, but in-game it doesn't play
i also did a few more checks and those red spheres are moving according to the idle animation when the enemy is standing there, the problem is that the avatar or mesh or whatever just isn't moving according to those. I have no idea how to fix this
51235
If you move the bones in the editor does the skin follow it?
And the animator component is on the right object?
@gusty zealot hello, my friends
this question has probably been asked a lot, but how do i make animations feel more realistic? i understand the overall process of each keyframe and how to make arm move from point A to point B, but the inbetweens are obviously very stiff, and i feel there must be a better way than painstakingly forcing it to make it realistic by editing every single keyframe
tried searching youtube for animation workflows for unity but all i could find are blender tutorials, which id love to use but i dont have enough storage lol
I change a sprite during an animation, but when it stops, the sprite is not reset back to its initial one (before the animation). Is that supposed to happen?
Well, that isn't really a unity question, so looking up general animation tutorials- even for drawn animation- should help.
Do you have root motion enabled?
Where do I see that?
Was hoping unity would have some features or possible code that can be implemented to create the in-between frames
In the animator component
It's not enabled, no.
There is no 'make animation look nice' button, no.
Sadly

Anyways,
On the timeline, is there a way to add a starting key frame, other than making the slightest motion and just using that?
Yes. You can directly add a key from the editor, or go to the inspector and right click on the element you want to add a key to there.
I have the following transitions at the moment:
AnyState -> BowDraw, When "State == 5"
BowDraw -> BowIdle, When "State == 5"
BowIdle -> BowRetract, When "State != 5"
Issue I am having is I can transition from BowIdle -> BowDraw because the condition continues to be met, resulting in rapid fire ping pong between BowIdle <-> BowDraw
Is there a way I can make BowDraw transition automatically into BowIdle, and prevent it from transitioning back to BowDraw?
Like theoretically what I want is to "block" a specific transition
Note that this question is with respect to "with the animator", Im aware I could fix this with a code solution, but Im wondering if there's a clever trick with the animator itself to "block" an animation chain from "regressing" backwards when its "root" starting point comes from the "Any State" node
Like theoretically I want to add a filter so AnyState -> ignores a small handful of specific states, so it becomes "Almost every state, but not quite all of them"
heyo, i'm having a bit of a noob issue here...
So I've set up and imported a rigged character, and have set up an animator with a walk cycle blend tree, and a masked override layer for a primary attack "swing" animation.
But when I play the scene, no animations play... the states seem to be transitioning properly since the character changes pose to match the first frame of the animation that should be playing, but it gets stuck on that pose.
The weird part is... if I touch almost anything in the Animator window while in play mode, i.e. tick and untick an arbitrary checkbox, or even just move a state around slightly, the animations start playing as expected, including the override swing attack.
What am I doing wrong? 
... I was in Playback mode, having naively set it in a script. š¤¦āāļø
I now think I know how to do this.
Lets say I have animation A that can transition into B if "Condition is met", otherwise if enough time expires it transitions to C instead.
So lets say animation A is 12 frames long, and I want the "transition window" for A->B to be for frames 7 to 12.
I would set the A->B exit time to be 0.58 (~7/12), with the "Condition is met" conditions.
I would also set A->C with no conditions, but an exit time of 1. That way it will transition automatically to C, but only once A is 100% completed its animation.
This should achieve the results right? Is this the "right" way to do it?
I expect it could
Why not try it and report back?
I've been wondering if a transition like A>B still runs if the condition is met after the normalized time has passed, but I haven't had a chance to test it
**I created disappearing animation for first unknown image (preview in the video)
Can I in some way create the same animation, but for different gameObjects? (to not create 5 animations instead) **
Is it possible to combine a Humanoid animation with another hand-only animation that is Generic?
can anyone help me with my animation
its well
using UnityEngine;
public class PlayerAnimation : MonoBehaviour
{
public CharacterController controller;
public Animator animator;
public float walkingThreshold = 0.1f;
private void Update()
{
// Get player movement input
float moveX = Input.GetAxis("Horizontal");
float moveZ = Input.GetAxis("Vertical");
Vector3 moveDirection = new Vector3(moveX, 0f, moveZ).normalized;
// Check if player is moving
bool isMoving = moveDirection.magnitude > walkingThreshold;
// Check if player is crouching
bool isCrouching = Input.GetKey(KeyCode.LeftControl);
// Set animator parameters based on player input
animator.SetBool("IsMoving", isMoving);
animator.SetBool("IsCrouching", isCrouching);
// Play the appropriate animation
if (!isMoving)
{
animator.SetBool("IsWalking", false);
animator.SetBool("IsRunning", false);
}
else
{
if (Input.GetKey(KeyCode.LeftShift))
{
animator.SetBool("IsWalking", false);
animator.SetBool("IsRunning", true);
}
else
{
animator.SetBool("IsWalking", true);
animator.SetBool("IsRunning", false);
}
}
}
}
for some reason its not playering the animation and idk how to make it work
We pointed you here because you mentioned that your animation is not working. Considering this is a coding question, you should just share this in #š»ācode-beginner
The whole point was that you didn't share anything to begin with
bruh
I JUST WANT TO FIX IT
and whats not better than to ask ppl that can code
its unity discord you should be able to ask for help because thats litterly part of discords
Yes but we're not supposed to guess your actual problem if you don't give any detail. Like, you're sharing code, it's alright, but it doesn't tell us what you're trying to achieve and what is the behaviour that's not to tour liking
ok then im trying to achive where i can walk crouch crouchwalking jumping sprinting idle animations but i think its in project settings idk tho
Please just share the code in #š»ācode-beginner because this is not the channel for issues related to animation in code.
you know what nvm becuase they say go to animation and now back to it
I don't see why you would get banned, just ask a proper question this time instead of asking to ask something
but i did
and they just sayd https://dontasktoask.com/\
i dont get it
so illl just give up
You just said "can someone help me" that's why they answered you this
state your question
There's no point arguing. This was send because you're not providing details. "can anyone help me with my code pls" and "my player animator isnt well animationg" whilst providing 0 context is not a good question. Please read #854851968446365696 -> "Asking questions" and we can help you if you actually share the code.
what's the problem and all
guys when i animate my player and i click on play the player doesn't have like the animations of right and up, can someone help me?
How do i make the current animation stop before transitioning to another? i have checked exit time and it still doesent work, the player just stays in an awkward position when he switches from running to idle
he's supposed to be straight up but he's tilted like that to the side from the animation
Do you have write defaults on?
Anyone here do procedural animation?
I'm kind of stumped on how to approach movement animation in my game
On one hand I can't reasonable animate a walk cycle through code. But on the other, how am I supposed to handle stuff like crouching without IK? No way I'm making like 30 animations for all of the combinations of crouch and stand movement
I currently use IK to put my character's hands on the gun
I downloaded some shit from mixamo and but it looks so god damn silly
I did set a mask so it only affects legs. Everything except legs here is code animated.
Why they jiggle like that
What do you mean?
Hey so im new to blender and I am having some problems. So I imported a model and already animation into unity and then I think I added a second layer of animation to it that randomizes the vertices that I made using AnimAll tool. The problem is when I import it to unity the random vertices animation dosen't work. Im complelty new to this stuff so I have no idea what im doing and just want some help. Thanks!
only object transform and armature transform animation is supported by fbx
How can I import a vertices animation to unity?
I'm generating some animation in unity so they're just anim files, I'd really like to attach curves to these like curves you can normally stick on fbx anims... any idea how this is doable?
Generally you don't
exceptions are shape keys/blend shapes, the alembic format and vertex animation textures

Anybody knows how to remove this animation interpolation?
The attack animation's sprites are in a wrong position, to fix it I changed the Position attribute but it gets interpolated with the first sprite
How do i make unity wait for an animation to finish playing before playing another
You can set a timer (with coding) and a transition condition that activates with that timer
but if i made a timer wouldnt the time waited be specific? Isnt it variable as the player can change between animations whether there's 50 frames left on the animation or 5
What do you mean? You want to lock the animation till "is ready" to change?
i want it to change animations the moment the current one ends
"Has Exit Time" option will solve your problem
@drifting lotus Here is the problem, when the animation changes to idle the player stays in an awkward position from the running animation, or is it a problem because it forcefully stops the animation when there is a condition?
idk
and i have exit time on
That happens to you with the code? Or just with manually checking / uncheking bool conditions
the player runs when the speed float is higher than 1
For some reason when manually changing bool conditions it will ignore the exit time
changing the speed via code will solve it ?
No no, im talking about something else
Maybe can you send a photo of the akward position?
heres the video, the player is just stuck at an awkward angle
Your idle animation only changes the position up and down
It never touches the rotation
So it won't mind if the rotation is the right way
Recording the rotation in the idle animation should fix the weird angle
Oh thanks, never thought of that sorry for wasting your time :p
You can just create a crouching blend tree for thelower body, and for the upper body use custom made animations like walking, idling, etc. You can go fully-procedural, it's possible. In my project, I have a full-body character with procedural idle, walking and jumping animations in combination with mixamo anims for the legs and pelvis
for someone who will encounter the same issue - it's not possible out of the box, the only way is to rotate the spine procedurally so it looks stable š
guys idk wjy but my animations arent working properly the player moves around.
https://screenrec.com/share/t3ungKSZ5P
The real fix would be what fankulaa said AND fixing the pivot position in the sprite editor instead of using position keyframes.
Wdym?
Which animations should be visible?
@twin musk Do not ping usergroups or anyone not in a conversation with you, it's obnoxious.
Ok
Question, but is it fine to use a model with unused bones? My main character model has a backpack, holsters, and other secondary objects that are all rigged. But I also have a version of the model without those things. In Blender, I just share the skeleton between the two because it's easier, but I'm unsure if there is a cost to doing this in Unity.
There is a minimal cost.
Like, it isn't free but unless you take it to an extreme it is unlikely to be an issue.
I believe that unity defaults to culling bones with no skinning weights in the model, as well.
That's handy if that's the case. Thank you for your answer!
(If not, there is an option to do so in the importer.)
hey guys, I need help with my animation, I have a crowbar that has an idle state, a pickup animation and a use animation ( the use one is not implemented yet ) and the problem is, the animation and transitions between pickup and idle loop when the conditions is triggered ( I use a trigger condition, there is no loop on animations and use multiple combinations of has exit time with the transitions ) but I only want my animations to happen once and get back to the default state, I searched the internet and the solutions wouldn't help, what should I do?
When I click on the model in the project window and expand it, and click the animation from the expanded part, it is different from the animation when I click on the model, go to the inspector window, and click on the animation from the clips. What is causing this discrepancy?
is there a way to add an aiming animation without animations if that makes sense
You do it by code
can anyone help me with adding walking animations to my character
i got it thanks
Probably, if you had specific questions.
My character has a rigidbody, I already rigged it and made animations. I just need help figuring out how i can set up an animation transition for whenever its moving
You wish to know how to make transitions in general?
I need to know how i can make it to where if i dont move, it plays the idle animation and if i do move, it plays the movement animation
You'll probably want to make a transition between the idle and move states, with a parameter such as a float as the condition, set from code by speed
I made a bool parameter to detect if its moving or not
I just dont know how to make the script
so i noticed @everyone that when i try to input my animation it says that it is missing the hip bone but i am using mixamo for it so idk whats wrong
thanks for trying to ping the entire server, that really is something that 20k people must know immediately
š¤¦āāļø
Don't ping people for random stuff. If they know the answer they will respond.
Of course it can do it.
Change the offsets of the animation clip
Or, of course, use a 'turning walk' animation clip
Or use a second track with apply scene offsets enabled
That seems odd. Break it how?
I feel like you have to be doing something wrong there, but it has been a while since I've needed to do anything like that and I don't have unity handy to check
The easiest thing to do would probably be to just use a character controller plus the recorder to record a clip of the character walking wherever you want it to.
Hey,
I've created an animation that I've set to "Play Automatically"
But when I start my game nothing happens ?
they say rotation (missing)
@celest remnant Don't use Animation component
missing means there is no gameobject named clavicle_r to be found at the expected relative hierarchy path
What should I use ?
Animator
If I have already an idle animator on my player, should I use animation rigging then ?
even if the second animator is on a child game object ?
"Animation" component is a legacy predecessor to Animator
Animator component finds the animated transforms hierarchically so the component or the gameobjects can't be moved around in the hierarchy
Animation Rigging works in tandem with Animator
You should not have multiple nested Animators in a hierarchy unless you know for sure that you need them to use separate animator controllers
so what should I do if I need to activate an idle animations on my character and an animation on my arms when I hit something?
I'd use Animator's animation layers
Thank you !
But now I want to start the animation only when a event is triggered
Iād start the animation when a bool is true
But then how can I set the bool to false after one loop?
You could set it to false immediately, or use a trigger which is basically what you're describing
"Has Exit Time" transitions happen automatically so you can have make the state return to idle that way
I can set it to true, and in the line which is just under a set it to false?
"line" in what context?
I'm not sure if the false overrides true when called this quickly, but if it does use SetTrigger instead
anim.SetTrigger("hit")
anim.ResetTrigger("hit")
like that ?
I expect that will work
public void OnFire(){
Debug.Log("fired");
anim.SetTrigger("HitPressed");
anim.ResetTrigger("HitPressed");
}```
this is not working
public void OnFire(){
Debug.Log("fired");
anim.SetBool("HitPressed", true);
}```
this code isnt working too
hitpressed isnt set to false
It looks like the script is not being logged into console, so the method is likely not running at all
the "fire" is logged to the console
so the method is called
During Play Mode you can right click and "jump to state" to confirm the animation state itself works
I would also confirm that the Idle state has "write defaults" enabled as it looks to be an empty state, and I'd also unfold the transition Settings to see if there's something weird there
When I set manually to true, the animation is working
all is good
but it still doessnt works
Are you sure the "anim" is the correct Animator?
I'm not spotting any obvious issues
Found the issues
The Reset trigger is overrinding the SetBool
So HitPressed is never set to true
but then should I use coroutine to set the bool to false ?
Are you saying you were resetting a bool with ResetTrigger?
yes
Trigger is a different type of parameter than bool
You could try using just a trigger parameter without resetting it
Resetting is only necessary if it gets stuck on
If you need or want to reset a trigger or set a bool to false after the transition has started I'm sure a coroutine or an animation event or any other type of delayed method will work
Generally it wouldn't be necessary
Make sure not to mix bool and trigger methods though
ok thx, so I'll use coroutine
Hi, could someone explain me why these textures get "ruined" like this when I rotate the bones?
You probably using pixel snapping https://docs.unity3d.com/Packages/com.unity.2d.pixel-perfect@1.0/manual/index.html
Scene view's resolution increases when you zoom in, whereas game view is limited to its target screen resolution
Hello. Do I need an animator to make something like this?
No but it seems suitable for this task
guys
should my parameters be checked off
or not checked
and also
why are my animation transitions not smooth
for exmaple they just snap whne i change them
Your parameters should be checked off if you need them checked off.
Your transitions are not smooth because your transitions are probably not blended.
and I would need a Blend Tree for that?
or is there a way to blend without one
You don't need a blend tree. You use a transition between two states.
Hi guys im making a cutscene using unity's animation timeline, I'm not too familiar with it and I have a problem I have my game object with an animator component in timeline, and whenever I add a animation to the timeline, my game object disappears from screen.
hey, so i have this animation that has a ton of keyframes (cuz mixamo) and im realizing the plater is too high up in this one animation. is there a way to just change all the y-position keyframes by an increment? i dont want to have to go through all the keyframes and adjust them manually š
Trying to understand how to make it. But can't.
Go into the curve editor and move the entire curve down?
you are a legend thank you sm
That doesn't really help us help you
Do you have a sprite sheet of the animation you want
An explosion sprite sheet, yes.
I have made color changing only.
Well, try this
https://youtu.be/FXXc0hTWIMs
Is there any way in the Animator Controller, that I can take a big chunk of existing interconnected nodes and "move" them into a new Sub-StateMachine?
Ah copy paste works, but I have to make sure I also copy AnyState state when I paste in to preserve those ones too
Okay new question:
Is there a way to declare an "empty" state purely that has the job of holding a "partial" if check, but it does actually do anything on its own, but then the "next" checks happen after it?
Like I have a giant swath of states that all have 4 conditions, but 2 of their conditions are all identical, it'd be nice if I could extract those 2 conditions out to 1 "empty" node than then passes off to the rest of em based on further refined conditions
Like a... switch statement
WAIT.... O_o... does this work? How do we get that part in orange to work though?
can you use something with wings like an angel/demon for example in the unity humanoid rig?
anyone know a solution to this?
Yes. You need to make sure to include the extra bones in the avatar, and they won't be retargeted like the humanoid ones will.
Set it to use scenes offsets, probably?
You can indeed do that. I'm not sure what you mean by the orange stuff, though.
As soon as it goes back to State A its going to instantly try and loop back to Empty State and just ping pong between the two
make a=1 a trigger instead of a bool?
Or add additional conditions
That defeats the point, lol
Like the core of my point is imagine what the left looks like in my example pic, except theres like... 20 of them or whatever, all of them have a=1 but then they have a variety of other conditions
But then lets say I change the logic of the a=1 part to something slightly different... just something small like "oh actually its a=2 now"
now I need to go and update that change on all 20 nodes, which is a huge pain.
whereas in, like, normal code I can do
if ( a == 1 ) {
if (b == 1) { ... }
else if (b == 2) { ... }
else if (b == 3) { ... }
....
else if (b == 20) { ... }
}
And if I change that logic for a == 1 to something else, it is 1 single change, not 20
Basically what I want is for my state to transfer from State A to Empty State only if it will then successfully transfer to one of states B through n
if it would not be able to transfer a "second" step out, it wont go to Empty State in the first place
Like what I want, theoretically, is for Empty State to not be a "real" state, its purely syntatical sugar that merely adds its own Conditions onto all "sub states"
Another good example of this, in terms of like another game is the concept of "Chain Signals" in games like Factorio / Satisfactory.
Effectively, I am imagining a "Chain" state (that it itself cannot be "hit", it just carries a signal).
The result would be that the right behaves exactly the same as the left. If you have a=1, b=3, it wont change state from State A
The big key is, if I change a=1 to a=2 on the right on, it updates for both, so if I actually have like 20 things and not just 2, I dont need to go and update the conditions on 20 items, I just update the 1 spot
Right, you can absolutely do that.
Aight, Im listening š®
The problem comes when adding in a return state with no conditions from the second state to the first.
?
What you show in your more recent diagram is easy. It is the extra bit in the previous diagram that is trickier.
well the more recent one is the goal effectively
I was pondering in the earlier pic if that was the "route" to achieve the goal I describe in the latter
What way would you go about achieving the results of my pic above here?
#šāanimation message
You can just do that, exactly the way you show in that last diagram, Just add one state with the transition to it and the multiple transitions out.
Yes, that one.
If A==1, B==3, it will still go to Empty State, wont satisfy my conditions with what you said
'go to empty state'?
it shouldnt leave State A for the conditions a=1, b=3
because it "lacks" the secondary state to get to
thus the concept of a "carry signal"
@hybrid tinsel imagine for both those pics on the left vs right, if you are currently State A, and A=1, B=3
right
Or do "empty states" actually behave as carry signals?
I have been presuming they dont
Empty states are just a state with no animation. They still otherwise entirely behave as a state.
will it stay on State A in the right pic? I thought it wouldnt, it would go to that theoretical "middle" state and get "stuck"
Whereas on the left pic, it does not leave State A
Your terminology is all confused. If there is no transition out of the empty state for b=3, it will stay there.
yes... I know, thats my point
thus it doesnt work
If it is 1 or 2 it will go to b or c.
yes...
Thus it doesnt satisfy my conditions
What I am talking about would be considered a "chain" state or "signal", its not an actual "real" state, its just "syntactical sugar" for your logic so you dont need to copy paste a condition 20 times
Lemme draw it like this, one sec
Note on the right there isnt a "state" in the middle
yeah, Ive been trying to figure out some way to achieve this "logically"
Write code.
using some kind of clever approach to the logic
even with code it doesnt seem like it will be good performance
Id have to basically write an entire new addition to the editor itself that is just a visual stand in for the left
I'm not sure what the problem with having a transition from the empty state back to a is.
This one?
#šāanimation message
If you have a=1, b=3 it would ping pong back and forth between the two
So?
????
Is that a problem?
yes?
how is that not a problem lol, itd mess everything up lol
youd be rapidly triggering State A over and over
if State A is like your idle animation or whatever, youd keep triggering Frame 1 of it over and over
no thats terrible hahaha
Anyway, it isn't that hard to write a transition by code if you need something the nodes don't support.
yeah might be what I consider tackling
ideally I try and create my own entire custom type of node
That seems like overkill.
like effectively speaking this custom type of node simply has baked in secret extra enter condition of "one of its exit conditions is satisfied"
So you can only enter into this node, if you also can exit it same frame
I mean, you could just sanitize the input so that only valid choices are possible.
Or use triggers instead of bools to avoid ping ponging.
triggers wouldnt work cuz youd have to trigger every single time you mutate
mutate?
and sanitize the input means now you need to "Track" every distinct mutation on the output and include each in "flipped" on the input
You're throwing a bunch of terminology that is presumably unique to your game at me.
like if instead if the "secondary" conditions are
B=1, C=3, F=2, H=4, etc etc... You'd now need your first "signal" node intrance to track B, C, F, H, for a "change" to refire
I feel like you are almost certainly overcomplicating things.
mutate is not a unique term to my game lol
mutate, as in a change of something from one thing to another
Not really, this is basic stuff for signals and state machines
I know what the word means. But not what you are using it for.
"Carry Signal" is the term for what I am talking about
Yes, but that is not something unity's animator does.
... I know lol
but implementing it seems like something worth the effort, but also Id be shocked if someone else hasnt done this in some way
I mean, fuck, just buy animancer I guess.
the animation controller does appear to be turing complete
does animancer support carry signals like this?
it came up in my search but I didnt see anything in its information that resembled the concept
No, but you won't be dealing with nodes so it won't matter.
...actually, I shouldn't say that. I don't know if it does, since he might've added that since I've last looked.
I mean I like the state machine overall
"I like 90% of this thing but its missing a key feature or two Id like to have" doesnt mean "drop the whole thing and swatch to an entirely different architecture" :x
I havent looked into how difficult or easy it would be to add my own type of custom node to the animator controller, how sealed vs extensible it is, etc
Harder than it should be, I can tell you that much from having used their node editor stuff for a different project.
The documentation is terrible
you know of any guides that dig into how to extend the functionality?
it looks like I need to inherit from NesterState or something along those lines, and implement a custom widget for it
Best of luck
How can I get my animation to effect all of my characters bones? My character has a lot of extra bones that are crucial so he doesn't clip with himself.
Use a generic avatar?
Who is master reactor?
anybody know an easy way of animating walking,sprinting,jumping and crouching without spending like 5hours of my time cuz Im a begginer and it will still look bad
btw this is the hierarchy
yeah i dont really know how to get the animations working but try using mixamo
How would I go about getting animations between two characters aligned correctly in Unity? Like a handshake or hug?
third track on the timeline should play an animation but the asset doesnt appear, why is that?
I want to animate with 2 different objects in Unity (3d), like this first object1 then object2 will move but I can't. Any video suggestions?
I am a complete beginner... Why cant i name a parameter?
You've cropped out the parameter list so there aren't many clues here
wdym, sorry
Nvm i see it now, thx!
I dunno, but he probably run Barter Town.
timeline
Okay, Thanks!
moving this here from code-general, although not sure if this is the right place for scripted animation, thanks!
I'm trying to control the animation controller via script with a single blend tree that has all of the poses. Since I do everything via script, I'm using a direct blend tree with no transitions.
I noticed that values seem locked from 0 to 1 (both in the inspector and using animator.SetFloat()). Is there a way to set a negative value with direct blending (I'm using a generic rig, not a humanoid either)? The docs doesn't say anything about a limitation like this.
I'm not sure why you would ever want a negative value as an animation blend. 
If you mean that there are negative values in here, that just means that Jog Backwards go from 0-1 when you walk backwards for example.
So I'm unsure what you want with this, can you explain further?
https://docs.unity3d.com/Manual/class-BlendTree.html
Tthanks for the response! im actually on that page as well. In my case, the character is swimming, and I want to go between -1 and 1 for blending poses that tilt the character up/down and left/right (left/down would be -1).
here for example, it tilts the character to the right (right/up work perfectly fine, setting negative values is the only problem)
Then I would expect 4 animations, swim up, swim down, swim right and swim left, and those go from 0-1. Inverting animations is as far as I'm aware not a valid way to do things, but maybe an actual animator here can help you with that. (I normally just program)
Got it, thanks (and same for me, quite new to animation). I hoped setting the strength -1 would be able reverse the pose direction to the left or down
was able to get it work by using 2 mirrored "animations" which are just set to 1 frame long so I could use them as poses! thanks again for the help
@hybrid tinselWhat is Barter Town? I don't know about that. Could you tell me more detail? I will waiting for your answer.. Anyway thank you.
It's probably a joke because "master reactor" doesn't mean anything. What is your actual question?
@uncut salmon lol. Do you know reactor using unity multiplayer engine. So I am looking for expert man about that.
Hey there,
Currently working on a mod for a game (The game supports mods)
I'm looking to add a new animation to the player. I've got an animation clip from Mixamo, I'm just not sure how to add this animation clip to the controller at runtime
Because you aren't using root motion, and the clip has root motion.
Depends on what the game supports; that's the sort of thing where you probably wanna ask them.
Hm. In that case, the clip might not actually have correct motion on the root.
Root motion only works if the clip has root motion in it.
It have - Humanoid@ClimbUp1MeterObstacleAssaultRifle_RM and Humanoid@ClimbUp1MeterObstacleAssaultRifle
i use this RM
its from Ultimate Animation Collection
I'm creating a 2D animation, which is supposed to be a looping animation like a pendulum, but when the animation is starting and ending there is a lag, I tried to convert the keyframes to auto but still its giving a bit of lag in the animation, any suggesstions how I can smoothen the animation?
Here's a reference
You might have it set up incorrectly, I guess. Maybe you have the wrong root node selected?
First suggestion, mute your microphone. Blew my poor ears out there.
For the animation, I'm not really sure what you mean by lag; your curves seem pretty continuous at the loop point. The motion itself vould be improved, depending on the effect you want, but you probably at the very least want to even out the shape of the curve, it is kinda lopsided.
my unity crushed after I made ton of animations for UI, when I opened it again, I did not see my animations clips, even tho they are saved in my folder and when I try to open them, there are no keyframe animations at all, what the fuck?
it's literally gone?
The code works well the animation states works well but the character doesn't move..
When I make the model generic, the animations work
That's the default Humanoid pose it resets to when there is no valid animation state, for example when missing motion or if motion is not set up for Humanoid avatar
the animation states work
but the character doesn't animate
when I make the rig humanoid
normally, it works on the Generic model
So that seems to suggest they're not Humanoid-compatible animations, assuming the rig's Humanoid setup is correct
I've tried to create an Animation Controller through script and saved it to the Assets Folder, but when I close and reopen Unity, the Animator tab is completely broken and doesn't show any of the states anymore :/
This is what its supposed to look like...
Or, at least, that's what it looks like when I initially generate the Animation Controller
The game just injects third party .DLL files and assetbundles, modders have all the freedom
hello can anyone help me with my animations
I would like my anims to play only when my player is moving
I need some opinions. My game involves a top down player like this. I can animate it using 2d skeletal rigging. But I am concerned about other animations. Like for reloading, this same character image sprite cannot be used and frame animation is more suitable. So what should I do?
You have to use the techniques that are suitable, obviously
Which means you may need multiple different rigs if you want to use 2D rigging
Swapping between them, or swapping to frame animation
But that swap won't be smooth
You have no such luxury, unless you make smooth frame animations for every animation and transition
There's also the sprite library for swapping individual sprites of a 2D rig which is often used to create the illusion of depth or rotation in side-viewed characters
Another option is to do the character fully in 3D, maybe with some shader or effect to make it look less 3D
That'd give you fully smooth animations and dynamic transitions
It'll be so hard to model the character. Out of budget
If you have to draw multiple animations frame by frame and even make multiple 2D rigs, then it seems it's more work in total
A 3D mesh needs to be built and rigged once and then it works for every type of animation with little effort
But ultimately it depends on what level of modeling expertise you have at hand
hello! im trying to attach a weapon to my character. The order of the body parts are defined in the skinning editor, they are fine. But when I attach a weapon to my player, I want the weapon between the front arm and the torso. I only can put the weapon in front or behind the entire player. Any tips? Thanks
Changing the Order In Layer of the weapon does not work
Apologies, I wasn't aware about the mic being recorded at max,
Coming towards the animation, I could see a half a second jerk at the end and start of the animation, I read about the warp mode in unity "pingpong" "Loop", but I dont see these options in my animation clip.
Yes the curves are pretty smooth, idk if adding more keyframes will help.
Thanks for the reply. Apologies again
Depending on the type of animation, you can get a pretty good idea as to the sort of curve shape you want. The one you have now is extremely lopsided, like there's a strong directional wind or something.
For a basic pendulum motion, I'd start with a sinusoidal curve and adjust from there for feel.
Oh okay, I can understand a little bit, I will try it with a Sine shaped wave.
Again much appreciated with the feedback, will get back to you soon with some output š
That's just a good starting point; it will be functional but boring. But from there you can adjust things a bit to add a bit more life to it.
next to Bone tab, should be a Sprite tab, right?
why is my sprite turning green for a single frame in my animation
Yes.
I'm trying to implement a simple combo , I have 3 animation state melee1 melee2 melee3 and 3 boolean animaition parameters with the same name. I count key presses within a time window and set the parameters accordingly. And I though I can reset them with:
var animState = _animator.GetCurrentAnimatorStateInfo(1);
var c = animState.shortNameHash;
if (c != _animIDmelee1 && c!= _animIDmelee2 && c != _animIDmelee3) {
Debug.Log($"{Time.frameCount} out of state, setting false");
_animator.SetBool(_animIDmelee1, false);
_animator.SetBool(_animIDmelee2, false);
_animator.SetBool(_animIDmelee3, false);
meleePresses = 0;
//_meleeButtonTimer = meleeButtonWindow;
}
This doesn't work. Seems like my bool params get reset back to false before the animation plays out, I was expecting, if I set all 3 bools to true, they would stay true until the last animation state finishes. Does this approach even sound right for this problem?
It looks like after setting the a bool param that initiates the transition, I get about 30 frames when the current animator state is NOT in that state, and only after that it reports the correct state. Looks like the animator doesn't consider being in the target state for the duration of the transition?
(even though it looks like it is in the animator window)
checking for !_animator.IsInTransition && .. solved it.
Hello,
Do you know if there is a way to mirror a clip animation ( a grab animation) done within timeline unity) ?
There is a "mirror" check box but it doesn't seem to work.
not sure what you mean by "mirror"? you can probably set animationspeed to -1 (I'd guess that's what the mirror checkbox is doing) if you mean mirror like left vs right hand than probably no.
It's more left vs right.
Finally it's seems to work with the following method :
duplicate the animation clip and paste negative value inside timeline keys.
Why doesnt my animatior tab update
How can I select a bone? I tried left clicking it but it doesn't work. The left click drag also doesn't seem to work... Is this a bug with unity?
Hi, this is my game and I'm trying to add a particle effect to simulate a "smash" on the soil. Is there any way I can make the particles have the same colors of the soil without creating a single particle effect for each type of soil? For example, the particles should be green if the soil is green (grass), grey if the soil is grey (stone) etc
You can set the color per particle.
anyone know why my character gets deformed when he starts to do a running animation?
ignore the obvious issue with teh clothes, focus on the legs and torso
as compared to the base model:
nvm, I figured out it was because I forgot to apply the scale in blender
as you see I am manually selecting all and moving it one to the right and then repeating with 1 less selected (to put a gap between all the single diamonds) is there a faster way to do it?
like a way to automatically put a gap between then with size 1 2 or maybe 3
If you select them all, you can drag the edge of the selection to scale the group.
However, if your intention is to slow down the entire animation, you can just decrease the sample rate.
Does anyone know why my model's arm has those stretching artifcat thingys
Anyone know how to get a objects base mesh to update as an armature animation plays? Pic below shows what I mean
You'll want to use primitive colliders attached to the bone transforms to approximate the collision shape
Otherwise you'd have to call a method to recalculate the whole collision mesh every frame the skinned mesh deforms
Anyone have any ideas? I donāt really know much about the specifics of whatās going on so something like this is a bit hard for me to figure out
Do you know how I could somehow grab the result of a skinned mesh deformation?
The best I can guess if from the skinned mesh renderer component
You sure you can't use primitive colliders instead?
It's a 3d mesh so no
Primitive colliders are 3D also
They're what pretty much every game out there uses for skinned mesh collisions
Even if there are ways to generate new mesh colliders at runtime, the generation is an expensive process and the mesh colliders themselves are expensive to do physics on as well, and there's no simple way to reduce the polycount of the collider
Which is why I want to triple-check that you really can't use primitive colliders for this
Unfortantly not, the mesh I am working with is a bit of an odd shape and a primitive sphere collider isn't going to cut it
Also there's going to be blendshapes aswell
Could you use multiple sphere colliders or no?
You can use multiple primitives of any shape together
https://discussions.unity.com/t/collider-on-skinned-mesh/12114
There are multiple solutions here, but none of them are recommended
works as a charm! and slow as hell as expected.
Think of it as a merry-go - round. I have a pole coming down the center of the platform and horses all around. Now I want to animate a rotation.. I have all objects in an empty as one grouping. Open up Animation and it is rotating on the edge of my empty.. Not the center. How to I fix this?
When you animate an object to rotate, it will rotate around its transform component, which for meshes is also the mesh pivot/origin, always relative to parent gameobject's transform
To see the pivot when selecting objects make sure the tool handle position is set to "pivot"
Thanks I thiink it was, but I will check again
You can animate an object to rate around its center point or any other point, but it rarely works well
Because the position will also have to be keyframed to perfectly compensate for the rotation's origin
That doesn't really work with any animation curves or blends
Yep. That is what I am up against. Will take a lot of keyframes
Not imperative to my design, but would love to solve.
If you need a rotation animation around a specific point it's often best to have a parent transform specifically as an axis of rotation
But also keyframes aren't really great for continuous spinning motion anyway since they're required to have clear start and end rotations, so it's often for the best to make the transform spin using scripts instead
That'd avoid the trouble of altering animation hierarchy as well, if you're already deep into it
Thanks. It is a learning curve for me! LOL
Star's idle animation
why does the reload just stay full
What's the recommended way to do IK based animation?
I have my own custom IK implementation
Right now I have a walk cycle for my character. I want to be able to drag my stomach (root) bone down so it turns into a crouch walk animation
And for the past few days I've been in over my head trying to figure out a way to only animate IK points
If I export an animation from blender keyframing only the IK points, it ignores that and keyframes every bone, essentially baking the animation
I've tried separating out the IK points into a separate rig in blender, animating only that rig, which has gotten some success
And I can keep tweaking it to get it to work
But I feel like if I'm in this deep trying to do something so simple then I'm doing something wrong. I'd like advice from people who have worked with procedural animation before. Thanks!
@twin musk why dont you try to set up IK in unity
so you export the skeleton fully rigged
wihtout the IK
then watch this video on how to set it up in unity https://www.youtube.com/watch?v=Htl7ysv10Qs&t=752s&ab_channel=Brackeys
Let's create procedural animations using Animation Rigging!
āŗ This video is sponsored by Unity.
ā Learn more about Constraints: https://docs.unity3d.com/Packages/com.unity.animation.rigging@0.3/manual/ConstraintComponents.html
āGDC talk on Animation Rigging: https://youtu.be/XjMKbElVNmg
ā Download the Skeleton: https://assetstore.unity.com/pa...
I know its brackeys but it helped me alot
You can't "export IK". I use Blender's IK to preview the animation in blender then use my own IK implementation to get the same (almost the same) result in Unity
Not using the Animation Rigging package, but will check this video out
k
as for this, your transition from reload back to whatever else might be messed up.
Yeah idk what it is ive been messing around w it for an hour
That seems like more of a blender issue than a unity one; I am pretty sure that there is a way to specify that you don't want procedural stuff baked, but that is the opposite of what most folks want so you'll have to mess with the settings.
Though in unity, for generic rigs at least, you can also specify which curves to include/exclude at import.
I think there's an export setting for that somewhere in the fbx export settings in blender
Any idea why it doesn't loop seamlessly ?
Many ideas. You need to show the details to not make people guess. Show how the clip is rigged in mecanim, show inspector meta data, even animation curves perhaps.
Static images are not helpful and you have most useful information cut off. Take a proper screen recording. You can use ShareX and I think Windows even has a built-in one I don't use...
Ok let me try
Also you really should work with any tutorial explaining the workflow how it should work.
It is the first time i have trouble with it, i already made lot of animation without any trouble
It's not my speciality, but I think these animations are designed to work with blend trees. Where it would naturally switch to/from idle. (And only part of the clip should be used to loop walking)
it means i need make it with unity so ?)
To loop walking use the part of the clip that loops
The clip has 3 parts. Start walking, walk and stop. You need to loop the middle part to continue walk cycle. Lookup tutorials how to do that or wait for someone who knows how to do that to answer.
is there a way i can fix this? the hand turns the wrong side
already tried, doesn't work š
i don't see it turn the wrong side, at what second of the video ?
the elbow is the wrong way
ok i saw, you should just select the elbow and not the hand
you mean place the ik on the elbow not the hand?
ik ?
i don't use unity for animation, but blender is similar and if you want resolve the trouble, you should move on the elbow and not the hand
like i said im using inverse kinematics. im am moving the hand elbow and arm at the same time. its just that the elbow moves the wrong way
hmm sorry i couldn't help for unity^^
no worries!
Well it is the problem you're having even if your application of a solution "doesn't work"
If your walk cycle starts from idle and ends in idle there is no reason to expect that it'd loop
Not seamlessly anyway
How i can arrange that ? Starting from frame 4 ? For example
A walk or any move cycle should not include idle poses at all
Hello everyone, I'm working on my FPS character, but I'm just a programmer I'm not really good with animations, so I have a basic animation of a humanoid character who is holding a weapon with both hands, and with the Animation Rigging asset I've been doing the IKs, in my right hand I have a GameObject that contains all the weapons available in my game, and so far everything works fine, but since I'm creating a recoil system for the weapons, I don't want the weapon to be controlled by movement of the hands if not that the hands react to the movement of the weapon by the recoil, how can I do that?
But when the character walks I want the weapon to bounce with the animation of the character since I have the ik with a weight of 50% so that it looks a little more dynamic.
@knotty leaf pivots are what determines the "center" of your sprite
So check what frames are happening when your skeleton gets displaced and look at the pivots (the blue circles) in the sprite editor window.
Your pivots need to align across all the sprites of your skeleton
these are my currents tates. first one is while attacking, 2nd is after attacking and walking and 3rd is before starting the game
so where would i place them/how do i mvoe them?
Is your skeleton a sprite sheet?
yes
Good
So go to the sheet and open the sprite editor
Thats the only way to edit pivots
Omg
nvm
i take it back
it's not a sprite sheet ._.
it's teh only character thats not a sprite sheet
Usually you want characters pivots at the bottom center
Thats scary so youll have to find the frames that are misaligned and set the pivots
Well its okay to have your skeleton pivot in the weird spot there just make sure theyre all in that spot so he doesnt move unexpectedly
So you might not have to set it for all of them
Do you use aseprite?
no
i found the skeletons on itchio
and the only thing i used regarding sprites was the unity sprite renderer
just checked the sprites. seems that the pivots are all at different locations
should i just place the pivots for all of them on the middle of the skeleton would that fix my problem?
its not a lot of work technically
Yeah that would be best.
I like bottom center instead of middle for sprite layering reasons but middles fine
How do you handle movement behind those graves? How does your game know what sprite goes on top?
i have differnt layers
player is above the gravestones, so it walks over them
they arent an obstacle (for now)
So what happens when player is behind the grave?
but i think i have to give them some sort of a box collider so nobody can walk over them right?
my gf was working on that and wasnt able to "hide" the player
Well no theres actually a really cool method you can do
Lemme link you the article
and this is what most 2d games do
basically to summarize instead of sorting objects by z values it sorts them by y values so if your object is above another object in it's y value it will appear behind it and if below it will appear in front of it
only annoying thing with this is you have to set pivots for your objects carefully
but its less hassle imo than layering with z axis
oh jesus
i think that's something that we'll tackle at the end of the game
just first making sure everything works
also quick question regarding the pivot thing: in the sprite ediotr i placed it between his feet. but after i dragged it back into the game the pivot is again at a weird location
did you click apply? also are you sure thats the same frame?
yep to both
it also states that the pivot point is at the set location
yet displays right next to the skeleton
so just bottom?
because custom pivot isnt the pivot you set in the sprite editor iirc
still dindt change anything
havent changed all pivots yet
was waiting if i should change something
that's how i tried adjusting pivots
did i do something wrong?
no uhh lemme see the sprite editor of that one
I've set them all to bottom, didnt change a thing
thats if i put them to bottom
but i think i know why the problem is occuring
is it mabye because in the attack animation it seems to be bigger?
like the sprite looks like its bigger no?
they are all 32 pixel per unit but.. that attack move is bigger ._.
as long as the pivot is right, the size wont matter, but if you are using the automatic way to set pivots it would change it. Can you record putting a skeleton sprite into the scene then change its pivot in the editor and let me see what happens.
it should 100% be changing so i need to see exactly what ur doing
yeah see it changes so youre saying it doesnt change when?
it does a jump for some reason
thats the pivot
but the blue circle is still next to the skeletons head no?
i though that blue circle was supposed to move?
but what are we trying to do now? If i put the pivot of every animation from center (what it was before) to bottom, is there anything supposed to change?
well initially the pivots were messed up
in the pack you got
thats why he jumped up
so play the animation
and then if its still off move the pivots of the off-frames to proper positions
with the custom pivot then?
right werent you going to use the custom pivots for those messed up frames?
in the video i changed the run animation from bottom pivots to top pivots, but the animation dindt change at all
so i thought if i change the pivot like that the animation should look different, maybe jump even more or something
i think I'm not sure anymore
okay so go to the frames where the skeleton is moved down and youll need to lower the pivots
so it changes from attack to walk and after the attack animation is done, it jumpes and goes back to walkin
so i need to adjust the pivots from the attack animation right?
yeah adjust them so that when the attack animation plays the skeleton doesnt jump down
but i do leave the pivots at the same poin in the run animation?
yes, you want to change the attack pivots to match the others
your run works properly
the attack is just wrongly pivoted
did it work
its okay i was stupid once too
im just watching some Monk and stretching my back while helping you
no worries
nope still not working for me q-q
es
yes*
attack animation
walking animation
move the attack pivot so it lines up, just need to find the right spot
im gonna work on my stuff, you should watch a video on pivots I dont think you understand them fully
good luck
yeah np
So i tried my best to fix it, looked at youtube vids and couldn't get it to work
if anyone has any idea how to fix my animation problem with the pivots please let me know
i have set up a 2 bone ik because that has a hint wich makes it look more natural but the thing is my shoulder doesnt move at all since it would be the third bone wich looks very unnatual. the chain ik looks even worse because it doesnt support a hint. how can i make my shoulder move aswell ? can i use a chain ik and limit the bone rotation ?
anyone know what a trigger parameter would look like if:
that if a gameobject comes close enough with x coodinate to another gameobject that it will trigger an animation?
like what the code would look like?
I am having trouble making one
I keep getting this error. I'm trying out multi-Aim constraint in Animation Rigging
.InvalidOperationException: The PropertyStreamHandle cannot be resolved.
This Exception was thrown from a job compiled with Burst, which has limited exception support.
0x00007ffe49461860 (391666fec440dd1421194b669d7ee9c) [unknown:0] UnityEngine.Animations.PropertyStreamHandle::UnityEngine.Animations.PropertyStreamHandle.GetFloat
0x00007ffe4946733e (391666fec440dd1421194b669d7ee9c) [unknown:0] UnityEngine.Animations.ProcessAnimationJobStruct1<UnityEngine.Animations.Rigging.MultiAimConstraintJob>.Execute(ref UnityEngine.Animations.Rigging.MultiAimConstraintJob data, System.IntPtr animationStreamPtr, System.IntPtr methodIndex, ref Unity.Jobs.LowLevel.Unsafe.JobRanges ranges, int jobIndex) -> void_c8f33d8311b05a719af63ba3c6df9340 from UnityEngine.AnimationModule, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null 0x00007ffe49466b06 (391666fec440dd1421194b669d7ee9c) 94d5c1f8e5738c317ab470f74caee94d 0x00007ff701aa3e75 (Unity) ExecuteJobWithSharedJobData 0x00007ff70224df7e (Unity) AnimationScriptPlayable::ProcessAnimation 0x00007ff7021d9dc9 (Unity) anonymous namespace'::ProcessPlayableGraph
0x00007ff7021d99cb (Unity) Animator::ProcessAnimationsStep
0x00007ff7021f6038 (Unity) UnityEngine::Animation::BlockRangeJobAnimator::AnimatorJob::Job
0x00007ff701a9f56c (Unity) JobQueue::Exec
0x00007ff701a9f89e (Unity) JobQueue::ExecuteJobFromHighPriorityStack
0x00007ff701a9ff74 (Unity) JobQueue::ProcessJobs
0x00007ff701aa218f (Unity) JobQueue::WorkLoop
0x00007ff701ca1977 (Unity) Thread::RunThreadWrapper
0x00007fff108655a0 (KERNEL32) BaseThreadInitThunk
0x00007fff112a485b (ntdll) RtlUserThreadStart
I have this feeling it is because my bone is set to humanoid
That is more of a #1062393052863414313 sort of issue than an animation thing?
Since it's an error from the burst compiler
Not really an animation question but something roughly like:
float distance = (target.position - transform.position).sqrMagnitude;
if(distance < (Math.Pow(range, 2)))
{
Animator.SetTrigger("whatever");
}```
Though you'll probably want to also have some check to avoid setting it every single frame that they are in range, or use a bool instead of a trigger and turn it off when they leave range..
Hi was wondering if someone could suggest how to add a tool to my 2d sprite character (who is also customizable.) Right now I've just childed an empty object to the characters arm bone so it will swing and move with the arm movements. I'll add a tool sprite library to this. Is this the correct way to do this? (It seems a little awkward to child a tool sprite directly to the arm bone, and not the arm sprite, which is why I'm asking.) Thanks for any help!
Hey I've just started doing animation and tried out using Coroutines and tweening but I keep facing the same problem.
lets say I made a function MoveTo(from, to) and I want to run it twice. How do I make the second one run after the first one is done? Because in my code both functions are running at the same time.
public void OnPress()
{
MoveTo(start, end);
MoveTo(end, middle);
}
async void MoveTo(Tower from, Tower to)
{
Disk top = from.disks[from.disks.Count - 1];
Transform T = top.transform;
await T.DOLocalMoveY(350, time).AsyncWaitForCompletion();
await T.DOMoveX(to.transform.position.x, time).AsyncWaitForCompletion();
T.parent = to.transform;
from.disks.Remove(top);
to.disks.Add(top);
print(to.transform.position.y);
await T.DOLocalMoveY(9 + to.disks.Count*18, time).AsyncWaitForCompletion();
}
Yea you start them at the same time, because in normal non-async non-coroutine functions all code runs immedaitely line after line
You need to either start the second one in the coroutine after the first one ends (and use a flag to prevent an endless loop) or alternatively dotween has a class in which you can combine multiple tweens and execute them one after another, but I dont remember how it was called
Your code executes normally, until it hits the first await. Then it returns back to OnPress and goes to the next line, and calls MoveTo again. Then it gets to the awair again, and returns, and continues on in whatever function called OnPress.
Then, when each particular tween is done, frames later, those functions resume running code from after the first await, until they hit another await - then they wait for frames and frames again. But because they were started on the same frame, they're going off at the same time.
I'll look into the dotween one, thanks
Hello, I had a question; How do I reliably set up retargeting store bought animation assets for a custom rig/model between Blender and Unity for my own editing?
I should probably learn more about async and coroutines before doing actual animation lol
I posted this here too where I elaborate futher
So I am coding a 2.5d game for unity 2022.3.4f1 and I am working on the blendtree animations for the character in which the players control. For some reason, the character is moving in 3 of the 4 movements (Forward, Left, Right) but when it comes time to activate the backwards animation it defaults to forward again? I am pretty new to unity so bare with me. Below is a video of it happening and a screenshot of my code. `using System.Collections;
using System.Collections.Generic;
using UnityEngine;
public class playermovementtest : MonoBehaviour
{
public float speed = 1f;
public Rigidbody rb;
public float groundDist;
public LayerMask terrainLayer;
public Vector3 movement;
public Animator animator;
// Use this for initialization
void Start()
{
rb = this.GetComponent<Rigidbody>();
}
// Update is called once per frame
void Update()
{
movement = new Vector3(Input.GetAxis("Horizontal"), 0, Input.GetAxis("Vertical")).normalized;
animator.SetFloat("Horizontal", movement.x);
animator.SetFloat("Vertical", movement.y);
animator.SetFloat("Speed", movement.sqrMagnitude);
}
void FixedUpdate()
{
moveCharacter(movement);
}
void moveCharacter(Vector3 direction)
{
rb.velocity = direction * speed;
}
}`
If anyone can help, it would be a lifesaver
Thanks this helps
But now it's if it's closer to mathpow ... What does that have to do with another game object?
The power thing is squaring the range to avoid using a square root in the distance calculation.
Which may or may not be important depending on your build target- these days it is mostly a big deal on mobile.
(But it is good practice anyway, I believe.)
Hi, I'm experimenting with root motion and I have a character using Rigify. In this animation, the root control (circle on the floor in blender) just has 2 keyframes, 1 at frame 0 and the other at frame 24 where it's moved forward by 3 blender units. The root of the model is set at the spine bone (hips) and the rig is imported as "generic".
What's causing this issue, and how can I fix it?
In this case, the other game object would be 'target'
It is impossible to say without more info but it looks like it might just be missing bone weights
Basically it is getting the squared distance between the transform and the target transform position(because getting the actual distance takes a square root operation, which is slow on some hardware). Then it is comparing that to your chosen range, squared to match the sqrMagnitude.
Can't view that image on mobile; can you embed it?
Oh I should replace the target with the name of the game object?
Well, generally what you do it you set that as a variable that references the game object you want to target
At the start of the script you would declare something like public Transform target; and then set the target either in the inspector or through whatever targeting method you like.
hello ive been trying to chain some animations togheter altough i have no clue how to play the chain
(it only plays Planestage1)
Ahhhh that makes sense
?
entire setup looks like this just incase i did something wrong
actually nevermind i may have saw it now
Yes give me a moment, obs exports to a weird file
sorry for the bad farmes but you get the gist
in the blend tree it even show the character animating perfectly fine, and then when I try and move him around he does that for some reason
hi im having a problem with there being a big delay between the same animation playing which isnt on a loop. in the animator its playing 0.1 times a second but in the game its playing around 3 or 4 times a second and there isnt an actual difference in the length of the calling delay and the length of the animation. ill show a clip below
try increasing the speed?
that would just increase the speed of th animation but there is an unwanted delay between them and idk whats causing it
do you transition back when playing that aninmation
what do you mean by transitioning back? the animation is the whole cycle of going back then forward to its original position
can you show the state machine
the animator?
yes
no i don“t think so
any other ideas on what it could be?
hmm really difficult . you could try these settings.
what should i put those settings on?
HasExit time could be interesting
what should i put th settings on
just tick untick the box
on the recoilhip transition right?
@gusty garnet it still does the same as before
yoo i fixed it by putting exit time on 0.1 seconds
anyone know what might be causing my arm to distort like this during an animation?
