#šŸƒā”ƒanimation

1 messages Ā· Page 18 of 1

hybrid tinsel
#

You need to smooth the weights more or the loops will have no real benefit. The point is to distribute the bending between multiple loops.

#

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.

limpid pebble
zealous elm
#

Does anyone have a walk strafe right/left human animation that is compatible with mixamo rig?

#

I need it very much

hybrid tinsel
zealous elm
#

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

zealous elm
#

just the entire animation is not playing correctly and it is not armature's fault

gleaming vector
#

ok thanks. guess I have to try it out then šŸ™‚

vestal iris
#

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)

buoyant relic
#

does anybody know why i cant edit the samples in my clip?

#

just isnt there

celest crag
#

you need to have a valid instanced object selected

buoyant relic
#

what does that mean?

#

sorry its just my first time doing ths

agile solstice
buoyant relic
#

well it doesnt show the samples in my editor

agile solstice
#

As Fogsight said you must have selected a valid object

buoyant relic
#

how do i do that?

agile solstice
#

Meaning a gameobject that has the Animator with the clip

#

How do you select a gameobject?

buoyant relic
#

what do you mean by that?

#

what i have is a prefab that has my character in it

agile solstice
#

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

buoyant relic
#

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

agile solstice
#

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

buoyant relic
#

thats fair ill do that tonight

#

thanks

chilly lichen
#

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?

agile solstice
chilly lichen
agile solstice
earnest elbow
#

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 😭

verbal phoenix
#

it somehow resets itself to 1
if anyone knows what may cause that please let me know

earnest elbow
agile solstice
versed fog
#

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
.

mossy crane
#

I need some help. I want to trigger multiple animators on one trigger, but i do not know how to do it

sage plover
#

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

tawdry reef
#

I ask myself the question but which script makes it possible to make a tail simulation in Animation Rigging?

tawdry reef
#

Thanks, i wil try it !

sage plover
buoyant venture
#

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

prime tree
#

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

eager scarab
#

My animations are spinning between transitions

#

Any idea?

#

Bottom right

zinc robin
#

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?

chilly lichen
unreal zodiac
twin musk
#

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.

graceful stream
unreal zodiac
graceful stream
unreal zodiac
#

ah shit im broke hahah

#

but thanks

buoyant venture
#

i try to move the bones but it makes this blue highlight how can i fix that?

#

i also cant parent bones

agile solstice
#

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

winter lagoon
#

why are his legs like that

buoyant venture
winter lagoon
#

the animation seem to bug out, why

unreal zodiac
devout rock
#

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?

agile solstice
devout rock
devout rock
agile solstice
#

The Animator and the character's model can be on a child gameobject to the character's logic components

devout rock
agile solstice
#

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

devout rock
#

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.

devout rock
agile solstice
# devout rock This is the structre right now, "Armature" is his bones and everything else is h...

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

devout rock
agile solstice
devout rock
agile solstice
#

That relationship cannot be changed

devout rock
#

Should the new object house the animator and nothing else?

agile solstice
devout rock
agile solstice
#

What script?

devout rock
#

Or one of those.

devout rock
agile solstice
#

It could be intended to be used with root motion which to my knowledge doesn't override the root transform position entirely

devout rock
graceful stream
#

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?

crimson bison
winter lagoon
#

why is every ANIMATION BUGGED

agile solstice
winter lagoon
#

but animations from mixamo bug out too

#

from every model

agile solstice
#

The rigs look too different to work with human animations anyway

prime tree
#

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

chilly lichen
#

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

blissful patio
#

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.

bright spear
#

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

agile solstice
devout rock
twin musk
#

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

eager meteor
#

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

agile solstice
#

The read-only one is embedded in the imported mesh asset and can only be changed through mesh import settings

vagrant swan
#

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?

agile solstice
terse vale
#

Why is it that when I insert an animator controller into the animator, the character half falls under the platform?

#

without animator controller

agile solstice
bright spear
#

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

agile solstice
bright spear
#

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

agile solstice
bright spear
jovial ruin
#

hey i was wondering how do i open the rigging menu

#

with the bones and the like

agile solstice
jovial ruin
#

this thing

tacit warren
#

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

agile solstice
jagged ruin
hoary knot
#

WHY DOES THE ANIMATOR KEEP RESETTING

#

i make some transitions, save it, open the project again and everything is gone

#

including the parameters

snow depot
#

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?

snow depot
#

@solar cometuncheck "has exit time" in the PlayerWalk->Idle transition

hybrid tinsel
#

Is the flipping of the bones visible when viewing the animations in the animation editor?

#

Or only in play mode?

snow depot
#

It seems to happen regardless of the current animation. I only showed idle animations, but you can see it happens regardless of clip

hybrid tinsel
bright gale
bright gale
snow depot
snow depot
bright gale
#

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

drifting lotus
#

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

agile solstice
#

That's the default pose when there is no animation or it can't be displayed for whichever reason

harsh basin
#

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.

autumn river
#

Does anyone know how to transition smoothly between animator layers? I can’t find a way to blend it

bleak arrow
#

How can i make a character who has apply root motiom move along platforms as child? Or any other method??

timid prism
#

How do I animate the parameter that is a float with curves? All I see is keyframes on the animation timeline.

agile solstice
timid prism
#

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

agile solstice
hybrid tinsel
twin musk
#

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

unique yoke
#

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?

finite shuttle
#

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

hybrid tinsel
unique yoke
hybrid tinsel
#

Um, you know how animations work in general, using keyframes? You can add keyframes for nearly anything that can be serializedm including hitboxes.

candid kelp
#

Any improvemetns I could make

#

open it in preview since the tape on one of the frames blends in with discord

shut axle
#

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?

bleak cypress
#

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 >_>;

rough wolf
#

I imported this PSD character to Unity, and it looks bad in Unity:

#

while it's ok on gimp

#

why?

candid kelp
hybrid tinsel
#

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)

hybrid tinsel
lilac zephyr
#

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

lilac zephyr
#

okey i found it XD

#

nevermind

bleak cypress
hybrid tinsel
hybrid tinsel
#

No to both for the built-in, but yes for the other two.

#

While using the animation window or timeline, by default.

candid kelp
rough wolf
#

Also why does this "round" the edges or something? This is the skinning editor

candid kelp
rough wolf
#

Uhm... it's already full rect

#

Oh I fixed it in some way

hybrid tinsel
bleak cypress
#

What would that look like?

pine badge
#

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?

exotic garden
#

Hi folks,
Does anyone know to to export .anim to FBX ?
I've tried FBX RECORDER, but the result is totally broken :/

magic tundra
#

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

hybrid tinsel
bleak cypress
deep oxide
#

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);
        }
    }```
oak comet
#

51235

hybrid tinsel
#

Or did you just select the animation from the project files

hybrid tinsel
deep oxide
#

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

hybrid tinsel
hybrid tinsel
#

And the animator component is on the right object?

deep oxide
#

yes

#

@hybrid tinsel

outer hare
#

@gusty zealot hello, my friends

vernal hinge
#

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

shut axle
#

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?

hybrid tinsel
hybrid tinsel
shut axle
vernal hinge
hybrid tinsel
shut axle
hybrid tinsel
#

Sadly

vernal hinge
#

Anyways,

#

On the timeline, is there a way to add a starting key frame, other than making the slightest motion and just using that?

hybrid tinsel
#

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.

bleak cypress
#

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"

ivory plover
#

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? atwhatcost

ivory plover
#

... I was in Playback mode, having naively set it in a script. šŸ¤¦ā€ā™‚ļø

bleak cypress
#

#šŸƒā”ƒanimation message

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?

agile solstice
#

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

balmy wing
#

**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) **

cursive hollow
#

Is it possible to combine a Humanoid animation with another hand-only animation that is Generic?

twin musk
#

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

left berry
#

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

twin musk
#

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

rapid surge
#

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

twin musk
#

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

left berry
twin musk
#

you know what nvm becuase they say go to animation and now back to it

left berry
#

I don't see why you would get banned, just ask a proper question this time instead of asking to ask something

twin musk
#

but i did

#

i dont get it

#

so illl just give up

rapid surge
#

You just said "can someone help me" that's why they answered you this

twin musk
#

oh so how do i say it then

#

help me what way

rapid surge
#

state your question

left berry
# twin musk so illl just give up

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.

rapid surge
#

what's the problem and all

twin musk
#

ohhh

#

ok

autumn pilot
#

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?

sacred tapir
#

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

sacred tapir
#

he's supposed to be straight up but he's tilted like that to the side from the animation

hybrid tinsel
#

Do you have write defaults on?

twin musk
#

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

sacred tapir
fleet osprey
#

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!

agile solstice
fleet osprey
digital lantern
#

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?

agile solstice
drifting lotus
#

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

sacred tapir
#

How do i make unity wait for an animation to finish playing before playing another

drifting lotus
sacred tapir
drifting lotus
sacred tapir
drifting lotus
sacred tapir
#

idk

#

and i have exit time on

drifting lotus
sacred tapir
#

the player runs when the speed float is higher than 1

drifting lotus
#

For some reason when manually changing bool conditions it will ignore the exit time

sacred tapir
#

changing the speed via code will solve it ?

drifting lotus
#

No no, im talking about something else

#

Maybe can you send a photo of the akward position?

sacred tapir
drifting lotus
#

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

sacred tapir
#

Oh thanks, never thought of that sorry for wasting your time :p

drifting lotus
#

Worked?

sacred tapir
#

idk im trying it

#

it worked, once again thanks for helping : D

magic tundra
magic tundra
obsidian shoal
hybrid tinsel
drifting lotus
#

Which animations should be visible?

twin musk
#

@everyone

#

i have my animation set up but i dont know how to attach it to the model

uncut salmon
#

@twin musk Do not ping usergroups or anyone not in a conversation with you, it's obnoxious.

twin musk
#

Ok

harsh patrol
#

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.

hybrid tinsel
#

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.

harsh patrol
hybrid tinsel
#

(If not, there is an option to do so in the importer.)

digital bison
#

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?

tough orchid
#

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?

misty echo
#

is there a way to add an aiming animation without animations if that makes sense

twin musk
#

Yes

#

It’s called procedural animations @misty echo

#

You can look tutorials for it

summer fjord
#

can anyone help me with adding walking animations to my character

misty echo
hybrid tinsel
summer fjord
agile solstice
summer fjord
agile solstice
summer fjord
#

I just dont know how to make the script

twin musk
#

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

lean sage
#

thanks for trying to ping the entire server, that really is something that 20k people must know immediately

uncut salmon
hybrid tinsel
#

Don't ping people for random stuff. If they know the answer they will respond.

hybrid tinsel
#

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

hybrid tinsel
#

That seems odd. Break it how?

hybrid tinsel
#

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

hybrid tinsel
#

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.

celest remnant
#

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)

agile solstice
#

@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

agile solstice
celest remnant
#

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 ?

agile solstice
#

"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

celest remnant
agile solstice
celest remnant
#

I’d start the animation when a bool is true

#

But then how can I set the bool to false after one loop?

agile solstice
#

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

celest remnant
celest remnant
#

anim.SetBool(true)
anim.SetBool(false)

#

like that

#

in the code

agile solstice
#

I'm not sure if the false overrides true when called this quickly, but if it does use SetTrigger instead

celest remnant
#

like that ?

agile solstice
celest remnant
#

this is not working

#
    public void OnFire(){
        Debug.Log("fired");
        anim.SetBool("HitPressed", true);
    }```
#

this code isnt working too

#

hitpressed isnt set to false

agile solstice
# celest remnant

It looks like the script is not being logged into console, so the method is likely not running at all

celest remnant
#

so the method is called

agile solstice
#

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

celest remnant
#

When I set manually to true, the animation is working

celest remnant
#

but it still doessnt works

agile solstice
#

I'm not spotting any obvious issues

celest remnant
#

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 ?

agile solstice
celest remnant
#

yes

agile solstice
#

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

celest remnant
rough wolf
#

Hi, could someone explain me why these textures get "ruined" like this when I rotate the bones?

celest crag
agile solstice
#

Scene view's resolution increases when you zoom in, whereas game view is limited to its target screen resolution

mortal kelp
agile solstice
misty echo
#

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

uncut salmon
#

Your parameters should be checked off if you need them checked off.

#

Your transitions are not smooth because your transitions are probably not blended.

misty echo
#

or is there a way to blend without one

uncut salmon
#

You don't need a blend tree. You use a transition between two states.

honest ivy
#

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.

mossy nest
#

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 šŸ˜…

mortal kelp
hybrid tinsel
mossy nest
agile solstice
agile solstice
bleak cypress
#

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

bleak cypress
#

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

bleak cypress
#

WAIT.... O_o... does this work? How do we get that part in orange to work though?

short thorn
#

can you use something with wings like an angel/demon for example in the unity humanoid rig?

honest ivy
hybrid tinsel
hybrid tinsel
hybrid tinsel
bleak cypress
hybrid tinsel
#

Or add additional conditions

bleak cypress
#

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

hybrid tinsel
#

Right, you can absolutely do that.

bleak cypress
hybrid tinsel
#

The problem comes when adding in a return state with no conditions from the second state to the first.

hybrid tinsel
#

What you show in your more recent diagram is easy. It is the extra bit in the previous diagram that is trickier.

bleak cypress
#

I was pondering in the earlier pic if that was the "route" to achieve the goal I describe in the latter

hybrid tinsel
#

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.

hybrid tinsel
#

Yes, that one.

bleak cypress
hybrid tinsel
#

'go to empty state'?

bleak cypress
#

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

hybrid tinsel
#

right

bleak cypress
#

Or do "empty states" actually behave as carry signals?

#

I have been presuming they dont

hybrid tinsel
#

Empty states are just a state with no animation. They still otherwise entirely behave as a state.

bleak cypress
# hybrid tinsel right

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

hybrid tinsel
#

Your terminology is all confused. If there is no transition out of the empty state for b=3, it will stay there.

bleak cypress
#

thus it doesnt work

hybrid tinsel
#

If it is 1 or 2 it will go to b or c.

bleak cypress
#

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

hybrid tinsel
#

Then no, you can't do that.

#

Because it is in fact a state.

bleak cypress
#

yeah, Ive been trying to figure out some way to achieve this "logically"

hybrid tinsel
#

Write code.

bleak cypress
#

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

hybrid tinsel
#

I'm not sure what the problem with having a transition from the empty state back to a is.

bleak cypress
#

If you have a=1, b=3 it would ping pong back and forth between the two

hybrid tinsel
#

So?

bleak cypress
#

????

hybrid tinsel
#

Is that a problem?

bleak cypress
#

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

hybrid tinsel
#

Anyway, it isn't that hard to write a transition by code if you need something the nodes don't support.

bleak cypress
#

yeah might be what I consider tackling

#

ideally I try and create my own entire custom type of node

hybrid tinsel
#

That seems like overkill.

bleak cypress
#

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

hybrid tinsel
#

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.

bleak cypress
#

triggers wouldnt work cuz youd have to trigger every single time you mutate

hybrid tinsel
#

mutate?

bleak cypress
#

and sanitize the input means now you need to "Track" every distinct mutation on the output and include each in "flipped" on the input

hybrid tinsel
#

You're throwing a bunch of terminology that is presumably unique to your game at me.

bleak cypress
# hybrid tinsel mutate?

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

hybrid tinsel
#

I feel like you are almost certainly overcomplicating things.

bleak cypress
#

mutate, as in a change of something from one thing to another

bleak cypress
hybrid tinsel
#

I know what the word means. But not what you are using it for.

bleak cypress
#

"Carry Signal" is the term for what I am talking about

hybrid tinsel
#

Yes, but that is not something unity's animator does.

bleak cypress
#

... 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

hybrid tinsel
#

I mean, fuck, just buy animancer I guess.

bleak cypress
#

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

hybrid tinsel
#

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.

bleak cypress
#

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

hybrid tinsel
#

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

bleak cypress
#

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

hybrid tinsel
#

Best of luck

devout rock
#

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.

heady storm
#

Who is master reactor?

violet dragon
#

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

twin musk
harsh patrol
#

How would I go about getting animations between two characters aligned correctly in Unity? Like a handshake or hug?

vernal hinge
#

third track on the timeline should play an animation but the asset doesnt appear, why is that?

tawdry wagon
#

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?

twin musk
#

I am a complete beginner... Why cant i name a parameter?

agile solstice
twin musk
#

Nvm i see it now, thx!

hybrid tinsel
devout rock
balmy niche
#

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.

dusty fern
balmy niche
#

here for example, it tilts the character to the right (right/up work perfectly fine, setting negative values is the only problem)

dusty fern
balmy niche
balmy niche
heady storm
#

@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.

uncut salmon
heady storm
#

@uncut salmon lol. Do you know reactor using unity multiplayer engine. So I am looking for expert man about that.

cursive hollow
vapid jackal
#

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

hybrid tinsel
hybrid tinsel
hybrid tinsel
#

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.

cursive hollow
#

It have - Humanoid@ClimbUp1MeterObstacleAssaultRifle_RM and Humanoid@ClimbUp1MeterObstacleAssaultRifle

#

i use this RM

#

its from Ultimate Animation Collection

tidal echo
#

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?

hybrid tinsel
hybrid tinsel
south anvil
#

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?

echo charm
#

The code works well the animation states works well but the character doesn't move..

#

When I make the model generic, the animations work

agile solstice
echo charm
#

but the character doesn't animate

#

when I make the rig humanoid

#

normally, it works on the Generic model

agile solstice
narrow tusk
#

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

vapid jackal
cursive hollow
brisk flax
#

hello can anyone help me with my animations

#

I would like my anims to play only when my player is moving

hushed phoenix
#

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?

agile solstice
#

Which means you may need multiple different rigs if you want to use 2D rigging

#

Swapping between them, or swapping to frame animation

hushed phoenix
#

But that swap won't be smooth

agile solstice
#

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

hushed phoenix
#

Hmm. I see

#

Thanks for the help

agile solstice
# hushed phoenix Hmm. I see

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

hushed phoenix
#

It'll be so hard to model the character. Out of budget

agile solstice
# hushed phoenix 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

compact plover
#

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

tidal echo
hybrid tinsel
tidal echo
hybrid tinsel
#

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.

compact plover
#

next to Bone tab, should be a Sprite tab, right?

normal basin
#

why is my sprite turning green for a single frame in my animation

vestal iris
#

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?

vestal iris
#

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)

vestal iris
#

checking for !_animator.IsInTransition && .. solved it.

exotic garden
#

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.

vestal iris
exotic garden
misty echo
#

Why doesnt my animatior tab update

foggy isle
#

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?

rough wolf
#

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

hybrid tinsel
grand ruin
#

anyone know why my character gets deformed when he starts to do a running animation?

#

as compared to the base model:

grand ruin
#

nvm, I figured out it was because I forgot to apply the scale in blender

tidal marsh
#

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

uncut salmon
#

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.

grand ruin
valid rover
#

Anyone know how to get a objects base mesh to update as an armature animation plays? Pic below shows what I mean

agile solstice
#

Otherwise you'd have to call a method to recalculate the whole collision mesh every frame the skinned mesh deforms

grand ruin
valid rover
#

The best I can guess if from the skinned mesh renderer component

agile solstice
valid rover
#

It's a 3d mesh so no

agile solstice
#

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

valid rover
#

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

grand ruin
#

Could you use multiple sphere colliders or no?

agile solstice
#

works as a charm! and slow as hell as expected.

fallow sun
#

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?

agile solstice
fallow sun
#

Thanks I thiink it was, but I will check again

agile solstice
#

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

fallow sun
#

Not imperative to my design, but would love to solve.

agile solstice
# fallow sun Yep. That is what I am up against. Will take a lot of keyframes

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

fallow sun
feral falcon
#

i cant adjust the samples of my animation
the samples value thing is missing

pliant tulip
#

Star's idle animation

misty echo
twin musk
#

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!

misty echo
#

@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...

ā–¶ Play video
#

I know its brackeys but it helped me alot

twin musk
#

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

twin musk
misty echo
#

k

twin musk
misty echo
#

Yeah idk what it is ive been messing around w it for an hour

hybrid tinsel
#

Though in unity, for generic rigs at least, you can also specify which curves to include/exclude at import.

keen jolt
worn lynx
celest crag
#

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.

worn lynx
#

Ok

#

Wait 2 sec

#

Just inform that animation has been made by blender

#

with*

celest crag
#

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...

worn lynx
#

Ok let me try

celest crag
#

Also you really should work with any tutorial explaining the workflow how it should work.

worn lynx
worn lynx
celest crag
#

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)

worn lynx
#

it means i need make it with unity so ?)

celest crag
#

To loop walking use the part of the clip that loops

worn lynx
#

that's what i made

#

from 1 to 59, it return to original position

celest crag
#

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.

unborn arch
worn lynx
worn lynx
unborn arch
worn lynx
#

ok i saw, you should just select the elbow and not the hand

unborn arch
worn lynx
#

ik ?

unborn arch
#

inverse kinematics

#

its whats causing the problem

worn lynx
#

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

unborn arch
worn lynx
#

hmm sorry i couldn't help for unity^^

unborn arch
#

no worries!

agile solstice
#

Not seamlessly anyway

worn lynx
agile solstice
craggy hawk
#

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.

violet hawk
#

@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

knotty leaf
#

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?

violet hawk
#

Is your skeleton a sprite sheet?

knotty leaf
#

yes

violet hawk
#

Good

#

So go to the sheet and open the sprite editor

#

Thats the only way to edit pivots

knotty leaf
#

Omg

#

nvm

#

i take it back

#

it's not a sprite sheet ._.

#

it's teh only character thats not a sprite sheet

violet hawk
#

Usually you want characters pivots at the bottom center

knotty leaf
#

so i guess i do it by hand for every single one of them? XD

violet hawk
#

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?

knotty leaf
#

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

violet hawk
#

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?

knotty leaf
#

they arent an obstacle (for now)

violet hawk
#

So what happens when player is behind the grave?

knotty leaf
#

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

violet hawk
#

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

knotty leaf
#

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

violet hawk
#

did you click apply? also are you sure thats the same frame?

knotty leaf
#

yep to both

#

it also states that the pivot point is at the set location

#

yet displays right next to the skeleton

violet hawk
#

dont use custom pivot

#

I think?

knotty leaf
#

so just bottom?

violet hawk
#

because custom pivot isnt the pivot you set in the sprite editor iirc

knotty leaf
#

still dindt change anything

violet hawk
#

is you animation fixed

#

is it just this one frame?>

knotty leaf
#

was waiting if i should change something

#

that's how i tried adjusting pivots

#

did i do something wrong?

violet hawk
#

no uhh lemme see the sprite editor of that one

knotty leaf
#

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 ._.

violet hawk
#

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

violet hawk
#

yeah see it changes so youre saying it doesnt change when?

knotty leaf
#

it does a jump for some reason

violet hawk
#

thats the pivot

knotty leaf
#

but the blue circle is still next to the skeletons head no?

#

i though that blue circle was supposed to move?

violet hawk
#

yeah im not sure about that it should

#

maybe someone else knows?

knotty leaf
#

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?

violet hawk
#

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

knotty leaf
#

with the custom pivot then?

violet hawk
#

yeah i guess i use sprite sheets so im not used to that setting

#

but probably

knotty leaf
#

ok, doesnt work ._.

#

let me show you

violet hawk
#

right werent you going to use the custom pivots for those messed up frames?

knotty leaf
#

not sure how i would do taht tbh

#

besides

violet hawk
#

do you understand what a pivot is

#

not flaming just want to help

knotty leaf
#

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

knotty leaf
violet hawk
#

okay so go to the frames where the skeleton is moved down and youll need to lower the pivots

knotty leaf
#

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?

violet hawk
#

yeah adjust them so that when the attack animation plays the skeleton doesnt jump down

knotty leaf
#

but i do leave the pivots at the same poin in the run animation?

violet hawk
#

yes, you want to change the attack pivots to match the others

#

your run works properly

#

the attack is just wrongly pivoted

knotty leaf
#

i feel so sorry for you

#

i'm so stupid haha

violet hawk
#

did it work

#

its okay i was stupid once too

#

im just watching some Monk and stretching my back while helping you

#

no worries

knotty leaf
#

nope still not working for me q-q

violet hawk
#

so to be clear you only changed the attack animation

#

right

knotty leaf
#

wait

#

i might now why

#

one secon

#

ok didnt work

#

frick

knotty leaf
#

yes*

#

attack animation

#

walking animation

violet hawk
#

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

knotty leaf
#

yeah i think

#

thank you for your help anyways

violet hawk
#

yeah np

knotty leaf
#

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

cosmic oyster
#

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 ?

tidal marsh
#

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

warm prawn
#

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

warm prawn
#

I have this feeling it is because my bone is set to humanoid

hybrid tinsel
#

Since it's an error from the burst compiler

hybrid tinsel
#

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..

mild sleet
#

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!

round arch
#

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();

    }
junior zinc
#

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.

round arch
fiery smelt
#

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?

round arch
#

I should probably learn more about async and coroutines before doing actual animation lol

fiery smelt
#

I posted this here too where I elaborate futher

frozen cloak
#

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

tidal marsh
#

But now it's if it's closer to mathpow ... What does that have to do with another game object?

hybrid tinsel
#

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.)

rich owl
#

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?

hybrid tinsel
#

In this case, the other game object would be 'target'

hybrid tinsel
hybrid tinsel
hybrid tinsel
tidal marsh
hybrid tinsel
#

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.

twin musk
#

hello ive been trying to chain some animations togheter altough i have no clue how to play the chain

#

(it only plays Planestage1)

tidal marsh
#

Ahhhh that makes sense

twin musk
#

entire setup looks like this just incase i did something wrong

#

actually nevermind i may have saw it now

frozen cloak
frozen cloak
#

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

twin musk
#

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

twin musk
gusty garnet
#

do you transition back when playing that aninmation

twin musk
gusty garnet
#

can you show the state machine

twin musk
gusty garnet
#

yes

twin musk
#

could it be something with the entry?

gusty garnet
#

no i don“t think so

twin musk
gusty garnet
#

hmm really difficult . you could try these settings.

twin musk
gusty garnet
#

HasExit time could be interesting

twin musk
gusty garnet
#

just tick untick the box

twin musk
#

@gusty garnet it still does the same as before

twin musk
grand ruin
#

anyone know what might be causing my arm to distort like this during an animation?