#🏃┃animation

1 messages · Page 63 of 1

wild locust
#

so basically put everything in the update loop to lateupdate @warm ore?

#

uf, that seems to work @warm ore . Thanks a lot! Do you mind explaining me what exactly caused the problem? Did i skip some frames in the update?

warm ore
#

Wait what did i fix you problem 😂 i was just responding to my own problem that i was talking about before you asked something. i didn't even understand your question lol

wild locust
#

lol haha, yeh it looks like. i moved it to lastupdate and it works atm

warm ore
#

nice man

wild locust
#

but maybe that's just a snapshot 😄

warm ore
#

damn i can even solve problems that i dont understand

wild locust
#

haha

#

unity should hire you

hidden raft
#

@hidden raft You can either have the sprite swap on a separate layer in the animator(set to additive) or you can do both inside the animation.
@hybrid tinsel Didn't get what you mean, sorry can you explain ?

hybrid tinsel
#

@warm ore transformations done in LateUpdate override animations.

#

...oh, you solved it already 😄

#

hehe

#

was scrolled back

#

@hidden raft you can swap the sprite in the animation.

hidden raft
#

Ohh

#

So I don't have to do it by code ?

hybrid tinsel
#

Well, you certainly CAN do it by code

#

But sprites are designed to be animated by the animator 😄

#

just set a keyframe and swap the sprite image

hidden raft
#

Yeah but what if I have to change the sprite from another script ? I'm currently using a variable to decide which sprite is showing, don't I necessarily need to do it by code ?

hybrid tinsel
#

Well, then you might as well do it by code. There's no real downside to it.

#

You could use a animation event to handle the timing

#

That is, you add an event to the animation that calls the function in your code

#

So it happens in sync with the animation

hidden raft
#

Ohh

#

That's a really good idea

#

I've used animation events before but it was kind of frustrating since it didn't let me add different events for different clips

hybrid tinsel
#

Well, your code is already deciding which image to use.

#

The clip doesn't really need to know that

hidden raft
#

Wait

#

Actually the animation of the bounce are 2 separated clips

#

Forgot about that, lol

stone prism
#

just a general question, im trying to set up lip sync for a pal of mine, what's the easiest way to do so?

acoustic tulip
#

Hey I got a quick question. For a final attack in an animation, I want my character do a punching rush animation similar to that of the JoJo series. My question is how do I add multiple arms to my character's animation clip? Do I add them inside my animation program and export them as a FBX or there's an easier way of doing it? Also here's an example of the Punching rush if you're unfamiliar with it.

smoky seal
#

A different question haha, sorry don't mean to cut in.

Can I get my camera rotation to play character animations? In my blend tree I already have an X/Z for strafing and forward/backward movement, but I was wondering if I can have another layer do camera rotation animations? Or am I mistaken.

If I have to choose between the two that's fine I just am trying to figure out how to get the Axis to translate into the Treeblend float without deleting my strafing.

Thanks!

dusky hedge
#

@acoustic tulip what if you made the arm a particle 🤔

wheat pendant
#

How can we turn player in place with animation like this ?

celest crag
#

@wheat pendant Don't cross-post

warm ore
#

If an animation has 2 exit transitions, both to a different animation, but containing the same exit condition

#

which one will be chosen?

warm ore
#

Or what if 2 different exit transitions are met at the same time?

acoustic tulip
#

@dusky hedge sorry I was asleep when you replied back. I haven't messed around with Unity's particle system but I guess this would be the perfect time to try it.How should I turn an arm into a particle?

dusky hedge
#

you can set a mesh to emit as a particle, if you google "mesh particle emitter" you should find what you need

acoustic tulip
#

alrighty! I'll give it a look! Thanks!

wheat pendant
#

how ro implament 180 rotaion aanimation like this and how plaese really need it

celest crag
#

Haven't you been given a bunch of tutorials in the other channel covering the topic?

twin musk
#

Can anyone help me how to play the animation attached to child? My script is attached to parent...

celest crag
#

@twin musk You can reference component from the child object and play it

twin musk
#

@twin musk You can reference component from the child object and play it
@celest crag I tried but its throwing null expression

celest crag
#

You need to assign it in the inspector if you are serializing reference.

twin musk
#

You need to assign it in the inspector if you are serializing reference.
@celest crag Thanks let me try it

twin musk
#

@acoustic tulip you could try rendering out each arm on a seperate layer and doing some post processing in after effects or something similar.

warm ore
#

I have animations like walking, running etc

#

but when my character holds a weapon, all those animations are different but the transitions between them are the same etc

#

How would you approach this

#

a new layer?

twin musk
#

Also curious ^, I just tends to do AnyState -> All of my animationStates based on bools for this kind of thing lol. Not neat.

warm ore
#

you could make 2 groups, one with animations while holding a gun, the other one while not holding a gun and then from any state -> on pickup weapon trigger -> to the idle state of the holding weapon animation group and on weapon drop to idle state of not holding animation group

#

i think that's what i'll do

#

because those separated groups leave the animation view quite easy to understand

limber trout
#

Hello, I am trying to learn some better practices using the Animator

#

I am trying to teach someone how to just make a simple basic 2.5D fighter with side to side movement and a punch attack

#

so far, I have Animator Parameters for MovingForward and MoveingBackward

#

I'm just not sure what would be the best for the Punch Animation

#

a Trigger or another Boolean?

warm ore
#

Do you want it to continue punching if you hold the mouse button?

#

If you just want it to punch on every click or something, use a trigger

limber trout
#

Well it is a template for a basic fighting game

#

for now, I'd like to do one animation each input

warm ore
#

if you would use a boolean for that, you would have to set it to true and back to false right after, because you only want the animation to play once

#

and a trigger basically does that automatically

#

when you activate a trigger, it sets itself to false right after it starts the animation

limber trout
#

I see

#

thanks

#

Should the Punch have exit time checked on for the Punch->Idle transition?

warm ore
#

I dont really understand what exit time does because i started with animations yesterday, but from my experience you have to leave it on if you want the whole first animation to finish or if you want a delay between them. I'd just play around with that and see for yourself if you need it or not

#

anyone can correct me if i'm wrong

limber trout
#

Well, thanks for clarifying what Trigger does

#

I think I got a good feel of the Animator a bit and coding it into a Script

warm ore
#

wow

#

how do you have the live view of the animation graph?

limber trout
#

I just open the Animator Controller window

#

and the Animator tab down below remains selected while I run the demo

warm ore
#

damn ty that is so handy

jade dew
#

@warm ore additive layers are used for this

warm ore
#

Oh i get it

halcyon lark
#

Does anyone know, with Animation Rigging, how can i execute some code after the animator updates but before the rigging constraints are applied?

jade dew
#

hmm perhaps onanimatormove/onanimatorik?

#

This callback will be invoked at each frame after the state machines and the animations have been evaluated, but before OnAnimatorIK.

halcyon lark
#

@jade dew thanks for the reply, but unfortunately this doesnt work. The animation rigging costraints seem to somehow be applied **along **with the animator update

jade dew
#

i think animation rigging evaluation is done multithreaded

#

i cant seem to find concrete info on the evaluation order tho

#

lateupdate calls after both right

halcyon lark
#

yup

jade dew
#

perhaps u can write an animation job

#

in the jobs system

#

since animation rigging uses that

#

idk tho

halcyon lark
#

yeah, seems like its the only way out really

sterile lagoon
jade dew
#

where is OnTreeChopped called?

sterile lagoon
#

in another script @jade dew, but I don't think it's relevant

jade dew
#

might be

sterile lagoon
#

uhh

jade dew
#

wait it loks like

#

its constantly resetting

#

huh

sterile lagoon
#

yeah

#

wait let me cut out the code where it's called and see what that does

jade dew
#

are u manually playing the static anim?

#

from anywhere

sterile lagoon
#

nah, I don't need that other transition

jade dew
#

i still think its bc ur chopped bool is constantly flipping, its probably bc of the way ur setting it

sterile lagoon
#

setting it to true?

jade dew
#

yea like, the code where ontreechopped is called

#

but wait yea

#

thatd make it be true forever

#

huh

#

good point

sterile lagoon
#

yeah that shouldn't cause it to flip like that, it's really confusing

#

it actually works fine when I place the prefab manually in the world

#

but when I instantiate it

#

and the instantiation is necessary because I need to create multiple instances of it

jade dew
#

hmmm... no idea why that might be happening

#

sorry

#

never came across that

sterile lagoon
#

it's all good

#

okay so the problem is really weird

#

seems to happen when the tree is a child of a tilemap

#

really weird

#

I've also noticed that with children of tilemaps Update never seems to be called, but for some reason FixedUpdate is

#

Okay, I think I've found a workaround

#

I actually think it has to do with setting the game object's parent in the instantiation

#

disregard that last sentence

#

I figure this has to be a bug

#

it's actually any child of a child of a grid

sterile lagoon
#

k I got it fixed

smoky seal
#

So I am using bools for all of my animations in mecanim, but the problem is if one accidentally fires off first, the entire animaiton finishes, then the FIRST bool triggers (because's waiting to grab the true.

I was told using Ints instead of bools is a bit more efficient, and also avoids that problem.
Does this hold any water/should I look into this

sharp marten
#

Has anyone ever ran into this problem before? My character is hovering off the ground and I can't seem to get her to fall and collide with the terrain...I've been working at this for a couple hours now and I'm at a loss

hybrid tinsel
#

@sharp marten Is the collider in the wrong place?

sharp marten
#

Im not too sure about that, but this is how far she starts off the ground, then pops up when I hit the play button.

#

if I raise her above where she pops up to, like in the first picture, when I hit play she will fall back to that height and hover

hybrid tinsel
#

That sounds like an incorrectly configured avatar most likely.

#

In play mode, can you look at the scene view and see whether it is the whole object hovering or just the skinned mesh?

#

That is, do the collider and root stay in place?

sharp marten
#

she is hovering in Scene as well, she pops up when i hit play

hybrid tinsel
#

Right, but what about the collider and root?

sharp marten
#

i don't actually know what those are lol She didn't have a capsule collider like the prefab thirdpersoncharactercontroller did

#

I followed a guide, and i remember it mentioned something about a capsule popping up when creating the avatar, or something along those lines. but when I followed the steps directly, no capsule ever popped up for me

#

Ah, it was adding a character controller. In my Unity, it didn't display a capsule wireframe when added, but in the guide it did.

hybrid tinsel
#

You might have gizmos hidden?

sharp marten
#

oh my goodness, the capsule is there now 😅

#

she still poofs up into the air, but I'm glad I can at least see it now. Thank you so much

slate bloom
#

Alright so i'm really new to unity, and although i happen to watch a billion tutorials i'm still incompotent about some features

So I want to split up an image I downloaded online, (In the green) and have done so using the sprite editor features, however I want to take this a step further, and have it be an individual asset (as in the blue) so I may use it in an animation. Is this possible to do so, and if so how?
https://cdn.discordapp.com/attachments/712051641049940091/733976079605432361/unknown.png

Sorry if this is in the wrong channel, and or is something extremely simple, I'm just trying to improve 🙂

hybrid tinsel
#

Each of those frames is treated as a single object, you can place them in an animation timeline in sequence

slate bloom
#

Thankyou Very much, I'm so embarrassed I didnt realise it!

hybrid tinsel
#

Nothing to be embarrassed about. You posted a good question and provided the info needed to answer it. 😄

smoky seal
#

Weird problem,I THINK it's animation based because of the input axis? If this belongs in a different channel lemme know, but figured I'd ask. So when I plug my xbox controller into my game, the axis all seem....eh...off?

Like WASD I can fluidly move 12'o'clock, 11, 10,9. Or 12 1 2 3, etc.

But when I plug in my controller it's like, 11....SNAP to 9. Etc.

Any possible idea?

jade dew
#

@sterile lagoon btw how did u fix it

#

just in case i run into it

hybrid tinsel
#

@smoky seal Which input system are you using? I'd suggest asking in #💻┃code-beginner just to get more eyes on it, but I'd also try doing a debug printing out the values coming in from the input so you can see what you're getting.

smoky seal
#

ok I can move it there. I am using built in unity input. Not the new one stil in beta ( I couldn't figure it out lol)

#

but yeah I'll definitely shoot over

#

I figured it might be animation because it seems like I "jump" between states in the blend tree, even though I don't on wasd. Hm.

sudden remnant
#

hey guys im not an artist and im using unity animator. for aesthetic I'd like to purposefully make some animations slower. however unity makes them really smooth. how can I change that?

sterile marten
#

how do i fix an issue where i press the space bar it pauses unity?

frank topaz
#

I have a character prefab for players in an online multiplayer game, and they have a Animator component, my own character works fine, but the other characters while they move the animator doesn't work, it gives me this error Animator is not playing an AnimatorController

#

My code is pretty simple

#
public class ThirdPersonControllerRemote : MonoBehaviour
{
    public void AnimatorRemote(float v, float h)
    {
        gameObject.GetComponent<Animator>().SetFloat("inputZ", v);
        gameObject.GetComponent<Animator>().SetFloat("inputX", h);
    }
}
#

Those v and h are received from another script

#

I checked the Animator component, its turned on too

warm ore
#

do you mean that only the person executing the animation can see it?

frank topaz
#

Yes, so basically what happens is, if I move locally animations works, these animation variables are then sent to a server and then received by the other players, but then the other players can see me moving but my animations dont play on there side

#

Its like I'm standing and transforming location

sterile lagoon
#

@jade dew just never make anything a child of a child of a grid

#

children of grids are fine though

#

but in my case I had the tree as a child of a tilemap and obviously the tilemap had to be a child of a grid

#

and that caused the animator to completely break

warm ore
#

Maybe run the client in the editor and see if the person that starts the animation has his animator set in his animatorcontroller?

frank topaz
#

they do

#

I checked

hybrid tinsel
#

@smoky seal If you watch the animator, does the float value jump? If so, it is not the animator(since it can only use the input it is given)

#

@sudden remnant Change the sample rate? Alternately you can add flat keyframes.

smoky seal
#

Yeah I figured it out, it was input

#

my WASD smooths, but my controller snaps

#

trying to figure out why/how to fix it currently

hybrid tinsel
#

Did you check the input manager?

#

Generally each input has separate settings for smoothing

smoky seal
#

Yeah, and I screwed with all the sensitivity/Deadzones/Gravity

#

No change

hybrid tinsel
#

ah

smoky seal
#

We decided I just gotta manually script it

#

which is fine.

hybrid tinsel
#

I've never tried a controller with unity so I dunno. 😄

smoky seal
#

lol fair

sudden remnant
#

ok so I did change sample rate but it still looks the same?

#

I tried it with just making an image move sideways and no matter the sample rate it looks the same

twin musk
hybrid tinsel
#

@sudden remnant hm, I've not actually tested it so I'm just going by what I've been told/read

#

That is esoteric enough that it might be worth posting to the forums

sudden remnant
#

alright thanks

hybrid tinsel
#

Good luck, and if you find something out please let me know!

sudden remnant
#

I should probably just learn to use an external program for animations to be honest haha

hybrid tinsel
#

Beats being trapped in Dark Bramble at least?

sudden remnant
#

yeah would be a way to solve it haha

hybrid tinsel
#

...er, dunno if that status you have up is appropriate for this place. o.O

sudden remnant
#

probably not but I forgot how to change

#

ok its changed

brittle garnet
sudden remnant
#

attack animation doesnt start until idle is over?

#

if that's the problem then maybe change something in the transition from idle to attack probably transition duration I think

brittle garnet
#

well i noticed it stops (attack anim) when activating other animations

twin musk
#

my animation is stuck at the first frame

#

its triggering perfectly but not playing

#

any ideas?

hybrid tinsel
#

Are you triggering it every frame? @twin musk

modest iris
#

how to import images for an animation in UNITY pls

twin musk
#

i cant find any tutorials

smoky seal
#

So I'm having a bit of an issue and I have tried a multitude of things and I am convinced there is a way that i just haven't figured out yet.

Basically I want 8 directional dodging.

Unfortunately when I put it in a blend tree, the character can change direction (Left to right) mid animation, and it breaks the dodge roll entirely. So I attempted to during that state, multiply whatever the float was and increase the damping time to force them to stay in whatever direction they were going. But that only caused the "accuracy" of the control stick to screw up. Usually when I pressed forward I would go left, or when pressing left I would to back left, etc.

The only other option I can think of is to create 8 states, one for each direction, and put parameters on each of them ( i.e. Left: x<-.5, z<.5, z>-.5). Which...is a nightmare I am sure for Mecanim when there are 8 states all with their own transitions to idle, from any, and to eachother. somewhere around 80 transitions JUST for the dodge rolling substate.

There's gotta be a way to do this that doesn't break the mecanim bank. Any ideas?

I can send pictures and more info if needed. Thanks!

rapid kiln
#

@smoky seal sounds like an input problem more than an animation state problem. Can you just ignore input while the dodge is animating so that they can't change direction? I think it comes down to managing the handoff between 'the player can control their character now' and 'the animation system is controlling their character' which is one of those problems every game has and the solution is specific to what you're building. If that helps at all

smoky seal
#

Hm good point. I suppose I could look for a function that clamps the input at...whatever it was the frame before, for the dodge roll. And then remove the clamp When the animation is finished.

#

I'll give it a try, thanks!

quasi crescent
#

Why is my OnStateEnter of the next state firing before OnStateExit of the previous state? Is this default behaviour?

hybrid tinsel
#

@quasi crescent Is there a blend between them?

#

If there is, then the start of the second state happens before the previous state actually ends.

quasi crescent
#

Didn't add anything extra, just using this as a state machine with no animations, should instantly jump between states.

#

Got it, enabled Fixed Duration and set to 0

#

Guess the default is something > 0

hybrid tinsel
#

Yeah, not sure what the default is, but it is definitely not zero.

shut pilot
#

What declaration is the correct syntax for implementing the ByTheTale.StateMachine.MachineBehaviour’s AddStates function?

covert acorn
#

Are there any "rules" for how to create 3d character walk/run/strafe animations so they'll blend properly? My run/strafes don't blend well at all (seemingly worse than just leg crossing issues) and the only guidance I can find is that you should "start" with the same foot in all animations? I was able to offset them to make that happen, but it still looks awful. Do my strafe/"run forward" animations need to be the same length or have their crosses at the same frames etc? Adjusting the time scale to "homogeneous" seems to help but still looks really bad

mild imp
#

@covert acorn use blend tree

#

In the animation window

azure onyx
#

Posting this here 'cause it might fit in this channel better. Whenever I try to configure the muscles for my custom-rigged model as a humanoid, the character ends up in this weird bent-backwards pose:

#

Does anyone know what would cause this?

hybrid tinsel
#

@covert acorn I just use the same timing for all my animations. I work in 2d though.

twin musk
#

Hey everyone. I've been trying to work on animations for unity 2d, where I can create a rig that accepts multiple sprites per bone, and move each part. I then want to be able to implement a script that will change the sprites dynamically. How would I do this?

hybrid tinsel
#

Hi @twin musk! Ok, you need to break that down somewhat. Each of those is a pretty big topic.

Unity just added Sprite Swap, still a work-in-progress feature, https://docs.unity3d.com/Packages/com.unity.2d.animation@2.2/manual/SpriteSwapIntro.html which can be used to organize multiple sprites under a single 'part.' You can also just use a script or an animation to turn individual sprites on and off or swap the texture (my preferred method).

twin musk
#

Actually, I think I figured it out

#

I'm now having trouble playing an animation using an animator through a script

hybrid tinsel
#

As for the 'multiple sprites per bone' thing, that is just a standard feature. You can assign weights from any bone onto any sprite.

#

Wha sort of trouble?

twin musk
#

Well, Can I show code here?

hybrid tinsel
#

Yes. If it is a couple lines you can enclose it in three `. If it is larger than that, use a pastebin link.

twin musk
#

Yep

#
    Animator m_animator;
    void Start () {
        m_animator = GetComponent<Animator> ();
    }

    m_animator.Play ("layer.stateName");
#

I know my Markdown 😛

hybrid tinsel
#

^_^

twin musk
#

What confuses me is, m_animator.Play(...) isn't activating yet not reporting errors

hybrid tinsel
#

Um, did you specify a state name?

twin musk
#

Yes

#

Base_Layer.Player

#

Where Player is the state and Base_Layer is the layer

hybrid tinsel
#

I generally don't trigger animations directly from code.

twin musk
#

We are triggering them on a run sequence

hybrid tinsel
#

Usually I use a trigger in the animator

#

Or a float, or a bool, etc

#

And let the animator figure out what to do

twin musk
#

oh, how would you set that up

hybrid tinsel
#

Well, for instance, animator.SetFloat("Speed", speed);

twin musk
#

oh

hybrid tinsel
#

Doesn't play usually take a time as well to make sure it starts at the beginning?(I'm not sure about that)

twin musk
#

¯_(ツ)_/¯

hybrid tinsel
#

Or something like animator.SetTrigger("attack"); to play an animation waiting for that trigger

#

That way you can be pretty flexible with layers, etc, as long as you use the same inputs you can reuse the same script with a variety of animators

twin musk
#

I am setting a bool now for the animator, how do I access it within the animator?

hybrid tinsel
#

Most commonly you use it to set conditions on transitions.

#

You create an interstate transition, then set it to trigger when the condition is met

twin musk
#

hm

hybrid tinsel
#

Though to be clear there's no reason that you shouldn't be able to play a state directly.

#

I just am not familiar enough with doing it to give advice with unity closed 😄

twin musk
#

Thanks @hybrid tinsel. I figured out my own style but the triggers definitely helped looking for.

hybrid tinsel
#

How'd you do it, if you don't mind my asking?

twin musk
#

Once I get it 100% working, I'll show you 😄

twin musk
#

@hybrid tinsel I got the start working using a trigger, but can't stop it

#

How do you stop it?

hybrid tinsel
#

Um, either use a separate trigger to stop it, or use a bool instead of a trigger so you can explicitly turn it on and off

twin musk
#

I was using conditional transitions

#

How would you do that?

hybrid tinsel
#

Just set a conditional transition that uses the bool being false

twin musk
#

oh

#

and it will toggle it?

hybrid tinsel
#

You have to toggle a bool via code.

#

Triggers automatically are set to false after being read by a transition.

twin musk
#

I got it working

#

It wasn't just that

#

It was a bit more than that

#

But it works

vale geyser
#

How do I get facial animations to work in Unity? The animations are humanoid and done in Blender. Thanks!

hybrid tinsel
#

@vale geyser when you say 'get it to work' can you be more specific? Do the animations not play properly? Are you not sure how to play them on top of body animation? Something else? Are the facial animations bone based or blendshape based?

vale geyser
#

Right, so how do I make facial animations work on top of body animations? And they are bone based.

hybrid tinsel
#

The way I do it is to set up an additive layer in the animator on top of the main layer that controls the body. And then play the facial animations in that.

#

(and by 'on top' I mean underneath it in the list of layers, because that's the order they go in in the animator for some reason)

twin musk
#

playerBody.GetComponent<Animator>().Play("playerSlide");

#

any clues why that doesnt work ^ ?

#

it doesnt play

grim moat
#

animator or animation?

#

bruh

#

idk

twin musk
#

animator

grim moat
#

how about just parameter?

#

boolean

twin musk
#

i changed it from animator to animation, and now its saying the animation cant be found, even though i plugged it in with the editor and the names in code are the exact same

grim moat
#

how about use animation lists?

twin musk
#

oh i got it to work, forgot to tick "legacy animation" xD

#

why isnt that automatic tho ):

viral pollen
#

So I recently imported a rig I made in Blender, into Unity. I configured it, and it was all good. Until I started making the animations. I made the animator component and hit the "Record" setting in the Animation tab. The position of the rig changed, into something different than it was before. I tried changing the bones, but a red highlight covered the position and rotation. When ever I tried to change it, it wouldn't do anything. What am I doing wrong? What could I do to fix it?

grim moat
#

i think that blender's animation =/= unity's animation

#

idk

hybrid tinsel
#

@viral pollen Did you import any animations with the model?

#

Is it a humanoid rig or a generic one?

vale geyser
#

@hybrid tinsel Thanks for your help!

twin musk
#

I just made an animation but it plays forever as soon as you start the game

#

any ideas to not make it act like that?

#

nvm

buoyant ember
#

so far ive been working on a 2d game in unity, stolen an asset and continued making the game, when i made the animations, it all looks good except that when i crouch the character is crouching... in mid air. anyone know how i can fix this?

devout ferry
#

Hello there, is it possible to export time stamps in Maya/Motionbuilder/Whatever in fbx file for having animation events in Unity? Or it is exclusive for unity meta files?

viral pollen
#

@hybrid tinsel no animations and it is a humanoid rig.

lofty stream
#

I've got a blend tree with a number of animations, the main ones being idle, walk (0.5) and run (1), when I try to run, I cannot run forward despite the VelocityY being at 1.

viral pollen
#

What about velocity X? @lofty stream Also, your animator might not be even entering into the blend tree. Is it only that animation. Or is it all of them that aren't working

lofty stream
#

Walking is working fines. It’s going from walking to running that’s the issue. It’s definitely entering the blend tree as it’s the default state.

gilded helm
#

the last frame of the enemy death animation is staying on screen forever, how to fix this? plz help

hybrid tinsel
#

@gilded helm delete the enemy gameobject at the end? Add an empty frame to the end?

#

@lofty stream does the preview work?

#

When you drag the dot around?

lofty stream
#

Appears to be working.

#

I think I might have figured out what the issue may be (think of it like a "eureka" moment), according to tooltop which can be seen in the first screenshot (which I apparantly didn't notice), one of the velocities was the same as another, I came to this conclusion by moving the red dot around to preview and noticed that it couldn't get past until I moved the blue dots slightly.

#

I'll still need to test it.

honest mountain
#

can I set an animation trigger, but only for a few seconds, then reset it?

#

i should also say i have next to no knowledge of how animator triggers work

acoustic tulip
#

@jade dew Hey. I think a week ago if I found out anything about setting animations in the timeline to be local I should let you know. I think I figured it out.

In a timeline test project I made, I created an empty gameobject and parented it to my player. Then I created a timeline playable on that object but removed the empty's animator from it since I don't need to animate it.

#

Then I animated the character normally but I set the track offset to scene

#

Then for the camera I set it to Transform

#

and that should do it

#

hope this helps

jade dew
#

oooh cool

#

thanks

#

@honest mountain u can either make the triggered animation last a few seconds

#

or make a boolean parameter, and in ur code use timers

#

perhaps can play with the transition times too

smoky seal
#

Do I use box collider triggers for kinematic rigid bodies?

#

Or... other kinematic rigid bodies

#

I can't understand the documentation exactly I guess I'm fried from coding all night

rich kiln
#

im trying to animate a model in a game but im unable to make any progress. when i play the animation nothing happens

#

i've been unable to find anything on youtube about how to fix my problem. ive been doing the same exact thing in all the tutorials i find

sudden remnant
#

guys so in unity when I make an animation where I just drop 2 keyframes

#

it will slowly slide from one keyframe to another

#

how do I make it so it stays at the last keyframe instead of doing the smooth slide thing

#

no, sample rate lower does not do that

#

I've tried

hybrid tinsel
twin musk
#

so im trying to add my sprite to unity but when i do i get odd artifacts and different colors

#

normal straight from ps

#

in other frames its worse

#

any way to fix this?

hybrid tinsel
#

@twin musk turn off compression in the image import.

wanton rune
#

is using empty gameobjects as containers Actually the only way to change pivot points for things??

tame canyon
#

guys

#

i need help, someone dm me plz

hybrid tinsel
#

@wanton rune Define 'things.' Some things(like sprites) let you define a pivot point directly, though for most things using an empty is the way to go.

#

And for meshes you import, you can set the pivot in whatever you made the mesh in.

wanton rune
#

@hybrid tinsel yeah I had a more specific discussion about it in general-unity, because my child objects kept skewing and I couldn't fix it no matter what. In the end for some reason the rotations work correctly like this, even tho this is not how most people do it as I understand and uh yeah I'm not really sure how this works

#

cuz currently the foot joint is a child of the shin joint, which is just weird. Also the names may be a bit misleading at the moment, but that's besides the point

hybrid tinsel
#

Skewing in what context?

wanton rune
hybrid tinsel
#

OH, I get it, yes.

#

I'm guessing the non-join elements are scaled cubes?

#

Scale will skew the rotation of child objects.

#

So yeah, in that case you'd want to have the joints be children of the parent joints

wanton rune
#

right, it's just very hard to comprehend, because when the joints are quite far apart it doesn't seem right

#

but i guess it is

hybrid tinsel
#

Well, normally you'd draw lines between the joints and call it a skeleton, and then hang all the pieces off of that 😄

#

(Unity bones are literally that. A bunch of empty objects with lines between them.)

wanton rune
#

right, but I couldn't really find any tutorials for that

#

some just suggested using blender n stuff

#

also what do u mean by lines?

hybrid tinsel
#

Well, for instance you can use Bone Renderer Component from the Animation Rigging package. It is just for visualization, though.
The Bone Renderer component allows the user to define a transforms hierarchy to be drawn as bones for visualization and selection during the rigging process. These bones are not visible in the Game view. This, for example, allows the user to define his character deform skeleton for rigging purposes.

wanton rune
#

I tried to use it but couldn't quite figure it out

#

but i'll keep trying

#

my brain's kinda fried at this point tho, so prolly tomorrow 😄

twin musk
#

@hybrid tinsel yep that works thanks

warm ore
#

When are you supposed to reset an animation transition trigger?

hybrid tinsel
#

@warm ore Triggers reset when a transition is triggered by them.

spice bolt
#

hey guys, im totally new so maybe this question sounds stupid but:
i exported my 3d character from my unity project into blender (as .fbx)
cause i want to rigg the character so that i can make a few animations, but it looks like this:

#

is there a easy way to fix it? sadly i never used blender before and the handling of this programm is a bit confusing

hybrid tinsel
#

@spice bolt I don't use blender but I believe someone in here before fixed a problem like that by applying their transformations in blender before exporting

twin musk
#

my particle system in Game is appearing behind the enemies, though in Scene it looks okay. i tried changing this setting here with no luck, i also tried adding a sorting layer and moving that above/behind the default and nothing changes. any thoughts on what im doing wrong? it also happens from pretty much any angle between tower and enemy

#

this is from the unity animation pack if that matters

twin musk
#

switching shader seems to have helped a little but not sure why. though it doesnt look at nice now

#

also the one up front still renders on top. after switching shader hopefully thats enough info to figure out what im doing wrong 😄

twin musk
#

also maybe it has to do with the height of the particles? they seem to rise toward the end of their lifetime. and the enemies in the back get engulfed while the front one or two dont

smoky seal
#

quick question with the animator

#

can I have the same named bools on different controllers, and they won't get caught by the same sends?

#

I.E. Prefab that has "isAttacking"

When prefab 2 makes an attack and sends an event to switch the bool, that won't effect prefab one?

#

Or does each individual character/animator controller share the same name across them all and thus needs different event+bool names

gleaming vector
#

@smoky seal no it should usually not affect other prefabs. prefabs use the same components (like animator or a health script etc.) but they don't share there values. they all get an instanciated copy of that script

smoky seal
#

Awesome. Thank you!!

gleaming vector
#

you are welcome. 🙂

twin musk
warm ore
#

I imported some animations from mixamo. however, i can not edit them. Because unity can display them correctly with all it's keyframes inside the animation window, i'm sure there must also be a way to edit them?

#

or is it best to just edit them in blender

hybrid tinsel
#

@warm ore You need to make a copy to edit them, because the files you're looking at are still inside the original files which are read only.

warm ore
#

i copied rifle idle animation. now it is called rifle idle 2, but still when i open the animation, it is read only

hybrid tinsel
#

Um, it looks like you duplicated the entire fbx file, not the animation

#

select the actual animation inside the file and duplicate(ctrl-d)

warm ore
#

wow

#

i swear i did nothing the previous time i tried that lol

hushed ember
#

if i make a 3d model in blender do i also animate it in blender?

hybrid tinsel
#

@hushed ember you can animate it in blender, in mixamo, in unity, or in anything else really

twin musk
#

i have a problem

#

i have a character that is in a 64 by 64 resolution

#

and im animating it attacking

#

the problem is that the weapon he's using doesnt fit within the 64 resolution

#

how would i go about implementing a sprite that isnt the same size as the rest in unity?

calm cargo
#

Anyone using Timeline know why going from one animation to the next will write defaults even when it is turned off?

#

for instance putting an animation into the animation track that turns off some objects (gameobject setactive false), then using the same track to move some objects - all objects will reset their active state.

#

even though the second animation in the track does not affect the object active state and has write defaults set to Off

calm cargo
#

Hmm... Seems like it may be because Timeline skips frames when you scrub...

#

Or not. Who knows.

quiet flicker
#

I have an object with mesh. I created an animation and the object rotate. Now i want to apply the rotation of the animation

#

How i can do it?

azure onyx
#

So, I've animated a character in Blender and exported it to Unity as an FBX, but when I play the run animation in Unity, her foot bones don't rotate at all, even though I have them rotating in the blender animation. How might I go about fixing this?

proven otter
#

@azure onyx did you use the animator in unity?

#

Also I have a problem with my animations if anyone wants to help

#

I need to attach my character animation to a script but I dont know how

azure onyx
#

Nope, I animated everything in Blender

deep hazel
#

can anyone tell me how vertex painting in blender affects shaders in Unity when importing as an fbx please?

#

is the vertex painting applied to the material used within blender, so if I replace the material in unity, the vertex painting done in Blender is not used at all?

austere ledge
#

anybody here uses PSD to skin sprites?

#

really struggling with the thing

#

I cant even get a multiple layered PSD to appear visible in the skinning editor

quiet flicker
#

Someone can explain me how to apply tha modify that an animation do on an object?

hybrid tinsel
#

@twin musk Just make sure that the pivot is in the same position relative to the character and the size can be changes with relatively few problems.

#

@quiet flicker If by apply you mean to have the rotation in the animation be set as the transform, you need to enable root motion.

quiet flicker
#

Yes, i want it

#

How can i do?

hybrid tinsel
quiet flicker
#

Thanks

hybrid tinsel
#

@azure onyx Are you using IK or other modifiers in blender? If so you'll need to bake all transforms or unity won't see them.

#

@proven otter not sure what you mean by 'attach' the animation to a script. Do you mean you want to have the script trigger an animation, or...?

#

@deep hazel vertex painting is stored in the mesh data, and how it affects the material in unity depends on the shader.

#

Some shaders use that info, others don't.

#

@austere ledge Is it a PSD file or a PSB file?

#

Unity uses the extension to know whether to use the psd importer or to just load it as a normal image.

quiet flicker
#

@hybrid tinsel it's working now

#

Thanks

deep hazel
#

@hybrid tinsel Thank you

#

are there any standard unity shaders that allow a single sided mesh to be double sided?

#

i have a simple mesh that is one sided and one side appears transparent, i require it to display the texture on both sides

hybrid tinsel
#

@deep hazel for which renderer?

deep hazel
#

srp, ie not urp or hdrp

#

do i need to get a custom shader perhaps?

hybrid tinsel
#

Um, both of those are SRP

#

I don't think any of the standard shaders show backfaces. Maybe particle ones?

deep hazel
#

i don't know what you mean by renderer

#

i'm just using stock unity

hybrid tinsel
#

Sorry, this is why I really hate them introducing such confusion.

deep hazel
#

no worries

hybrid tinsel
#

There is a built in renderer, and then there is the scriptable pipeling(SRP), and srp includes URL/lwrp and HDRP

deep hazel
#

it's the built in renderer

hybrid tinsel
#

For the built in renderer, the default shaders don't show back faces but you can make an edited version pretty easily to disable the backface culling

deep hazel
#

making such things is beyond my capability at the moment!

#

know of any available for free on asset store perhaps?

#

would it come under shaders perhaps?

hybrid tinsel
#

There are literally hundreds, based on your specific needs.

#

It is literally adding one line to any given shader though

#

I'd just google it if you want a ready made one.

deep hazel
#

thanks

warm ore
#

i have the weirdest bug ever

#

i have this animation

#

i took one from mixamo and edited it

#

now the first video of the working animation that i sent, is my player prefab dragged onto the scene and tested with that player prefab

#

BUT

#

when my in game character (which is exactly the same as my player prefab) plays the animation

#

it plays a different animation

#

and it's not even the unedited version because that looks like this

#

it is so weird

#

now look at a side to side live comparisson. The left one is the player prefab that i dragged into the scene, and the right one is the player prefab that is spawned in the scene and possessed by the player

#

they both have the same animation

#

but one does it correct and the other does not

#

another side to side comarrison

#

here left is the not correctly working version

warm ore
#

just ignore my question it is too vague

#

i think i also know the problem to my previous question. I think i am rotating the bones of the skeleton instead of properly adjusting the values in the animation editor

#

i'll just use blender, works way better

azure onyx
#

@hybrid tinsel restarting unity seems to have fixed the problem somehow

hybrid tinsel
#

ah good

twin musk
#

noobie question, if i have a game object with an animator on it to do something like changing the alpha level of the object over time to make it appear to fade in. if that object has children i want to manipulate and create animations for do they need their own animators on the object, or can the parent one handle that? what if anything would need to be on the children?

hybrid tinsel
#

@twin musk An animator will affect anything lower in the hierarchy than the animator UNLESS that object has its own animator.

hybrid tinsel
vale geyser
#

@hybrid tinsel The facial animations don't work 😦

#

any idea on what could I do?

primal garden
#

I made an animation thats supposed to shoot a projectile from a tower when its instantiated. However, everytime I place a tower the projectile shoots from the same tower not the one I just placed. any ideas?

hybrid tinsel
#

@vale geyser what facial animations?

vale geyser
#

I had a problem with facial animations for my humanoid rig in unity?

hybrid tinsel
#

@primal garden how are you telling the script which tower to instantiate out of?

#

Ok, I vaguely remember, but I answer so many questions a day that details fall out of my tiny cat brain 😄

vale geyser
#

Didn't know how to make them work, you helped me but now the facial animations don't work at all.

#

no it's ok

hybrid tinsel
#

So they did work, and then they stopped working?

vale geyser
#

They never worked.

#

Is it important that they are not in the humanoid mapping, the facial bones?

#

I guess they're "custom bones" if you will.

#

The mapper give me the options for the jaw and eyes, that's it.

jade dew
#

@vale geyser

#

perhaps read up this one

#

idk either but i think these are used for facial anims

vale geyser
#

@jade dew Thx, I'll check it out.

hybrid tinsel
#

@vale geyser How do you have them set up? Do the facial animations preview properly?

#

Do you have them on a second layer?

wheat goblet
#

Hi can someone help me out, right after i used humanoid rig on my model, all the color dissapeared from the materials list, does anyone know a way to fix this?

spring viper
#

i've got a super frustrating issue

#

i'm saving the materials from a skinned mesh renderer, then swapping the materials to something else, then swapping back again later

#

using a script by the way

#

but if the model has any animations in its controller that do anything with materials, it blocks my script from changing the materials

#

so i thought fine, i'll store the original materials, disable the animator when i swap the materials, then enable the animator again after i swap back to the original materials

#

this works up front, it lets me swap materials once the animator is disabled, but then the material becomes stuck and will no swap back to the original no matter what i do

#

does the animator do some weird stuff with materials, like store instances of them somewhere?

jade dew
#

animators do store the default property values iirc

#

can u try smth

#

disable "write defaults" on ur animator

#

try it

#

might actually cause some issues tho, but try it just to see if its fixes the material thing

#

perhaps theres an api function u can use

#

to update the defaults

#

right after u swap the material

#

try that too

#

oh wait

#

maybe this

vale geyser
#

@hybrid tinsel They were on a second layer, they don't preview at all either.

unique pulsar
#

Hi, is there somewhere options regarding how Unity reads .blend file? Like, to choose options similar on fbx export, like 'only deform bones' and such. (Might be wrong section for question now that i think)

kind pawn
#

Hi, why mixamo animations are not working in new unity?

hybrid tinsel
#

@vale geyser If they won't preview at all there might be some problem with the animations themselves?

vale geyser
#

@hybrid tinsel Am I allowed to send a screenshot? Just to show you.

celest crag
vale geyser
#

Ok thanks!

#

And the character has a focused face in this animation. However, the face bones stay in the position of the photo above this one in Unity, everything else works. Any ideas?

celest crag
#

To make sure you are not missing something you can follow any of the tutorials on youtube illustrating exporting to Unity.

vale geyser
#

That's a good point, but literally everything else works as wanted. It's the face only.

hybrid tinsel
#

The bones ARE imported, right?

#

Can you open the face animation in the unity animation editor and see it there?

twin musk
#

Hey!

#

I have a problem where the shoulder of my model in unity is deformed

#

But in blender

#

It looks fine

vale geyser
#

@hybrid tinsel I don't get it... It works fine in the preview. But the face bones don't even move in game when I click play.

hybrid tinsel
vale geyser
#

She totally vibin doe

hybrid tinsel
#

@twin musk Looks like it could be an avatar problem, the joints put in the wrong positions?

#

@vale geyser How did you set the layers up?

#

Is the face in a higher layer than the body, and set to additive?

vale geyser
#

Like you told me some time ago, the face anims are on a separate layer. And it's on the bottom of the list.

hybrid tinsel
#

Ok, so that's how it should be

#

hm

#

Can you set it to play just the face animation rather than the body?

vale geyser
#

No actually it's in the same animation. I've done a simple idle animation with a rifle, which uses masks. The face layer uses a face mask so I can have the face part of the animation on top of another separate animation.

jolly forum
#

Im trying to import a fbx model from mixamo (fbx for unity format) but the textures are not appearing and the model is gray. Any idea why its not working?

hybrid tinsel
#

@vale geyser so if you don't mask the face out, does the face animate properly as part of that animation?

#

@jolly forum I'd ask in #🔀┃art-asset-workflow to see if anyone has specific advice but in general I'd suggest just adding the textures manually if they were included

jolly forum
#

I will just use another model for now but thanks still 🙂 @hybrid tinsel

vale geyser
#

@hybrid tinsel Just tried without masking it out, still doesn't work.

hybrid tinsel
#

hm

vale geyser
#

This is a super weird problem XD

hybrid tinsel
#

Um, maybe silly question, when you imported the rig you selected 'keep extra bones' when converting to humanoid?

#

Did you set the layer weight of the face?

vale geyser
#

Weight was 1, and where do I "keep extra bones". I'm not super experienced with unity.

hybrid tinsel
#

in the file import settings

vale geyser
#

Thanks, I'll look at that right now.

twin musk
#

In my import setting there are these animations

#

and stuff

#

Where are they and how do i get access to them?

vale geyser
#

@hybrid tinsel That did the trick. Thank you for your persistence.

twin musk
#

Idk the joints look right n stuff

#

export issue?

tawdry lava
#

Anyone know why my model does this weird stance during runtime? His import rig animation type is set as humanoid and its only during runtime that he will jump to that stance. I'm using the unity animation rigging package, but it seems to always come out like this, whether or not its enabled. I'm a little confused as to whats causing the issue, but it has to be an effect thats applied at runtime

#

I've narrowed it down to the fact that its a complication within the animation rigging package. When I disable the rig builder it no longer goes to that stance. Anyone know why its doing that?

jolly forum
#

How can I lock animation in place? My running animation keeps running forward in world space when I just want it to stay in the same position.

tawdry lava
#

uncheck "apply root motion" on the characters animator controller

jolly forum
#

Thank you so much 🙂

short ingot
#

does anyone have a run animtion sprite sheet i can look at?

#

i need to use it for reference

sudden remnant
#

So I have a dude in a bone animation rig thing and I want to replace specifically his eyes. However, when I do this, the eyes just stay still when I move a bone. Something I'm missing?

jade dew
#

@tawdry lava i havent used animation rigging but

#

that looks like a misconfigured default pose in the avatar settings

#

theres a part here about

#

resetting to the t pose

silver ridge
#

I have my animator controller on my player

#

My idle animation is playing

#

but I don't see the player idling?

hybrid tinsel
#

@snow sinew Not sure what you mean...?

twin musk
warm ore
#

How do you make the collision follow when the character is in a different animation

#

or is that not possible and should i just use a box collider

hybrid tinsel
#

@warm ore could use a collider, could use raycasts, could use timeline to sync them

spice mirage
#

My jump animation is being cancelled because my ground check is still detecting the ground for the first few frames after I jump (I have an event that cancels my jump animation if the ground is detected). Is there any way to prevent this from happening?

swift temple
#

that way, isGrounded gets updated immediately after jumping

rain flume
#

Hey guys Im wondering if any one can help me Im trying to achieve 8 directional sprite billboarding for my project. I couldnt find any tutorials on it so I bought this package from HealthBarGames which does it for you. Problem is my game started from a 2d base to achieve the 2.5d effect and with his package the sprites show up sideways with no way to rotate them. I tried contacting the guy who made it but i have a feeling he is no longer active

spice mirage
#

@swift temple thank you very much for the answer, but would it be possible if you could go a little more in-depth? My programming skills are relatively beginner level.
Here's my script for reference: https://pastebin.com/F6qtVur4

swift temple
#

oo i'll do what i can!

#

THANK GOd you're using a rigidbody instead of a chara controller

#

right now, i think what's happening is that in the first few frames you jump, the ground check is still overlapping

#

one way you can fix this is by adding a separate collider for your player's legs, and while your legs are in contact with the ground, isGrounded is true

#

alternatively you can just crank checkRadius lower and lower until the problem goes away 😅

supple niche
#

hi, i need some help with unity animation. I did a custom aCat humanoid animation with a tail in Maya, i have baked the animation and imported to unity. I tried playing the animation in preview but it does not play?
Should i only export the rig?

supple niche
#

Fixed

spice mirage
#

@swift temple the code looks promising but the jump animation is still being cancelled 😦
I put the code on the legs like you said, and assigned the character controller, but still nothing

something I did notice though, Visual Studio seemed to see 'OnCollisionEnter2D()' by itself as a compiler error
I tried setting it to void OnCollisionEnter2D(Collider2D collider) to get rid of the error but it doesn't seem to have taken any effect

swift temple
#

aw dammit

#

did you add using UnityEngine; to the top?

#

OH WAIT

spice mirage
#

Also, I forgot to show you before, but the event in the code is meant to invoke OnLanding();

Yep

#

?

swift temple
#

hang on, i'm actually pretty confused why you're using onlanding() as an event

supple niche
#

can someone help me with the animation? My character has a tail and the animation rig is set to humanoid.

#

when i hit play, its only playing on the Y value

swift temple
#

did you comment out the isGrounded = Physics2D.Ove... line in fixedupdate()?

spice mirage
#

Should I just call it when it detects that isGrounded is true?

No that line hasn't been commented yet

swift temple
#

try it out! don't worry if that doesn't fix it, i still have more ideas

spice mirage
#

Alright, thank you so much by the way!

swift temple
#

thanks for being patient!

spice mirage
#

Hmm, that didn't work. Now when I jump the game thinks the character is falling forever.
I think the problem might be with the legs script. I added debug logs to make sure they work but I'm not getting anything in the console when I jump and land

swift temple
#

hmm in the game view, the collider on the legs is touching the ground, right?

#

switching contact pairs to allow callbacks on kinematic and static pairs

spice mirage
#

I think what was happening was that the legs were colliding with the body so it thought it was grounded still
So I made sure that they were separate but now the character is halfway into the ground

I put those scripts in but even before I made the change it didn't do anything
God what could it be??

swift temple
#

:shudder: the legs are on the right collision layer, and they're not a trigger collider, right?

#

and if the legs and body are parented to the same gameobject and are both kinematic, then i don't think they collide with each other

spice mirage
#

The settings are exactly the same as the body collider, which isn't going through the ground

swift temple
#

wow that's haunted

#

the layer is the same for both, right?

spice mirage
#

Yes

swift temple
#

asdxvmk could you highlight all the colliders on your player and send a screenshot of scene view after pressing play?

#

i'm worried that the legs and body might not be moving with the parent

spice mirage
#

both moving with the parent

swift temple
#

cute!! and huh

#

what about a screenshot where it's on top of the ground?

#
  • is the smaller circle inside of the ground when that happens?
spice mirage
#

yeah

swift temple
#

could you send a screenshot of the inspector for each gameobject the chara is made of?

#

soz if i'm asking for too many i'm just equally confused and invested rn

spice mirage
#

just swap groundcheck for legs if that's what ur used to

#

I kept the body collider in the parent object is that bad?

swift temple
#

nope! that makes things simpler

#

i feel like im having a stroke give me a phat minute

spice mirage
#

YEAH SAME TBH

swift temple
#

@spice mirage delete the kinematic rigidbody on the legs

#

if this works im retiring

spice mirage
#

S\XDFUKSENK

#

ENJOY RETIREMENT

swift temple
#

AFCRKHSTNMXVZWMAOEUZWVXMZOEVWXMWVZQJMkvwzqjmkvzwqjmk

#

MONEY

#

holy hell

#

that took a good ten years off my lifespan

spice mirage
#

Thank you so much lowercase omfg

swift temple
#

gotta admit

#

that was actually pretty fun

#

please come to me if you get more bugs! ^^

spice mirage
#

I'm glad one of us enjoyed this LOL
I will, thank you so so much!!

swift temple
#

and you as well!! ✌️

floral bolt
#

Does anyone know how to fix a issue where if i press A or D to walk too fast the animation stops?

#

pretty new to animations

swift temple
#

please try changing line 28 to if (Input.GetKeyUp("a") && !Input.GetKey("d"))
and line 33 to if (Input.GetKeyUp("d") && !Input.GetKey("a")) @floral bolt

ocean garnet
#

hi Imake animation 2d game okay

#

so Im noop very in animation

#

Peeped can give me any video learn me?

karmic nexus
#

I'm animating a material property, but unity animates all materials properties on same object. How can I avoid this ?

swift temple
karmic nexus
swift temple
#

yep, you'll need to write a custom script if you want to modify the properties of a renderer instead of the material

#

material properties are static afaik

karmic nexus
#

thanks

swift temple
#

good luck!

#

if there's another way to go about it, i'd love to know too because this solution is a hassle

karmic nexus
#

if there's another way to go about it, i'd love to know too because this solution is a hassle
@swift temple will let you know if I find one, but i'm pretty sure that script is only solution ...

vital blaze
#

hey hey, in terms of root motion animation

When i create a jump animation
i was wondering,
would you keep the root on the ground and just give it the X/Z movement or should the root also have the Y movement for when it comes to jumping on an object for example i would think
if:
the root stays on 0 Y in the animation that it would maybe snap up and the character gets pushed up by the height of the object before landing
else:
the root has the Y movement as well and so the player lands clean on the object after the jump.

what are your thoughts about this?

hybrid tinsel
#

@vital blaze I wouldn't do either. I'd have the jump height entirely controlled by script.

swift temple
#

WHoa that's cool

#

is it all procedural?

hybrid tinsel
#

Shadergraph + 2d bone animation

neon pasture
#

Anyone know whether there is a limit on maximum number of states in a blendtree?

hybrid tinsel
#

Though I'm thinking you could do the animation procedurally, maybe with IK, so they will grab at stuff

#

If there is a limit I've not hit it.

swift temple
#

pretty solid!

hybrid tinsel
#

Thanks!

rain flume
#

Hey guys im having problems with my gun animations not cycling trough properly I think it has to do with the exit time in the animator

#

the idle animation is 40 seconds and the shoot animation is 15 idk why it wont cycle properly

#

I set the exit time to .99 thinking that, that would let the firing animation finish but it just freezes

#

this is how the animation should look like if it cycles properly

short ingot
#

does this look good?

viral pollen
#

yes

#

although on one of the frames, there is a stray grey pixel

short ingot
#

yeah i saw that lol

viral pollen
#

alright

hybrid tinsel
#

@rain flume Is the transition actually triggered?

rain flume
#

i have it triggered when the Shoot boolean is set to true

hybrid tinsel
#

I am asking whether it is actually being marked as active in the animator

#

Like, obviously it is supposed to do that 😛

rain flume
#

this is how i have it set up in the animator

#

i tried setting it up another way by having it transition to and from the shoot and idle animation but that did not work since i dont have it set up properly in the script for that

twin musk
burnt field
#

I have a lot of parts on a model I'm animating and it'd be a pain in the ass to add them all to an animation I built to return a model to a default position

Is there a way to quickly add every part at once?

hybrid tinsel
#

@rain flume If your script sets it to true and then never unsets it then the 'any state' transition will keep transitioning to the start of it?

rain flume
#

I figured out the problem i was supposed to be using a trigger instead of a boolean. I was trying to copy the animator from a tutorial i followed and forgot that it was using triggers lol

burnt field
#

is there a way to have an animation move towards a keyframe regardless of where the object's position starts at?

#

I'm trying to make a one-size-fits-all-transition animation into idle

crisp pond
#

Hello EveryBody hope you all doing well

#

if anyone could help me with my problem please

torpid plank
hybrid tinsel
#

How is the upper body set up?

scarlet idol
#

@torpid plank its because of punching goes back movement

#

you should bound it entry or any state

#

im not sure but worth to look

torpid plank
#

@scarlet idol Already did that earlier apparently, it's better now but not fully okay (see below)

#

@hybrid tinsel Put it below, together with the current result, small improvement but not fully okay yet

#

Here is the body setup (it's just default from Mixamo). Also character and animations are Generic not Humanoid.

hybrid tinsel
#

If the animations are generic, then blending via layer mask might not work right, not sure

torpid plank
#

@hybrid tinsel That would be strange no?

#

Since I selected the bones in the avatar

twin musk
#

hey guys first time poster long time user, I am trying to get my cape to animate in unity, just for testing purposed I made it flow to a running animation then loaded that into the default state but it's not playing in the play mode. what could be causing that? the avatar and models are the same for the import and playmode.

#

I'm using ummorpg

trim hatch
#

I'm not sure if this is the right place to ask about state machine behavior

#

since they're part of the animator component

graceful lantern
#

why wouldn't it be?

trim hatch
#

cause it involvs coding

#

would it be better to have bullet firing be based on animation or by script?

#

or a combination of both?

#

like if the enemy is pointing at the enemy

#

then play fire animation which has an animation event that fires bullets?

#

what's the right way to do it?

#

anyone here know about unity's scene linked behavior script they have in their 2D game kit?

#

I was following this tutorial

#

but I'm having trouble with it

#

It calls methods from a monobehavior

#

but the method has a timer

#

and the timer isn't working correctly when called from scene linked behavior

#

what should I do?

#

and there's barely any documentation about scene linked behavior

trim hatch
#

can someone help me with a state machine behavior that isn't working right?

#
 public class chase : SceneLinkedSMB<CopyUnit>
    {
        public override void OnSLStateEnter(Animator animator, AnimatorStateInfo stateInfo, int layerIndex, AnimatorControllerPlayable controller)
        {
            m_MonoBehaviour.targetplayer();
            m_MonoBehaviour.offset = .8f;

        }

        public override void OnSLStateNoTransitionUpdate(Animator animator, AnimatorStateInfo stateInfo, int layerIndex)
        {
            if(m_MonoBehaviour.facetarget())
            {
                //play fire animation
                animator.SetTrigger("shoot");
            }
        }
    }```
#

face target is supposed to rotate to face the player

#

and if the rotation equals the angle to the player then it should shoot

#

but it isn't working right

#

here's the face target code

#
 public bool facetarget()
        {
            Vector3 dir = OrientTo - transform.position;
            float angle = Mathf.Atan2(dir.y, dir.x) * Mathf.Rad2Deg;
            Quaternion q = Quaternion.AngleAxis(angle, Vector3.forward);
            transform.rotation = Quaternion.Slerp(transform.rotation, q, damping);
            if(transform.rotation == q)
            {
                return true;
            }
            //feet.transform.rotation = Quaternion.AngleAxis(angle, feet.transform.forward);
            return false;
        }```
#

what should I look for to figure out why the enemy isn't always rotating to the player

trim hatch
#

here's the face rotation code when it isn't called by scene linked smb

#

so why doesn't it work with state machine behavior code?

crisp pond
lyric pier
#

im not too familiar with 3D animation, so i cant help, try googling or something

crisp pond
#

well i tried

#

i had this problem for too long

lyric pier
#

im having another problem in 2D that i cant fix

#

its been 3 days

#

its quite sad

swift temple
#

what's the other problem?

lyric pier
#

no its the animator problem

swift temple
#

oh f

#

what are you animating with transform.position? maybe it's easier to do with a script

lyric pier
#

what do you mean by that?

swift temple
#

what animation is playing when your chara falls through the floor?

lyric pier
#

idle

swift temple
#

why does your idle animation need transform.position as a property? sounds wack

lyric pier
#

im using a character rig

swift temple
#

oohh

azure onyx
#

Using blender 2.8 and the "copy pose flipped" function changes the rotation of the wrong bones. I've tried reorienting the bone roll and that hasn't fixed it. Anybody have any ideas?

#

n/m, figured it out myself

shut pilot
#

How do I retrieve an AnimatorStateInfo reference from the Animation Controller named “myAnimator” in Layer 1.

swift temple
shut pilot
#

@swift temple thanks!

swift temple
#

ive never used it before, but i'd start there

#

good luck!!

shut pilot
#

What script statement can be used in a MonoBehaviour script to get a reference to a GameObject’s animator component now?

swift temple
#

myAnimator = GetComponent<Animator>();

#

god im never coding on a phone again

shut pilot
#

Are you pretty good with animation in unity @swift temple ?

swift temple
#

if the animator is on a different gameobject, you could add [SerializeField] before the property and assign it there!

#

uhh ive worked with it but im more comfortable with procedural animation!

shut pilot
#

what does the loop time thing do?

swift temple
#

i'm not sure i know what you're talkin about

shut pilot
#

theres a box in the animation properties panel labeled loop time, does that make it just repeat the animation once its done it once?

swift temple
#

one sec, but that sounds right

#

i can't find a loop time myself, but i'd be surprised it if were anything else heh

shut pilot
#

yeah I found it in a unity3d manual too

swift temple
#

nice!

shut pilot
#

How do I make my character not fall over when I put a capsule character in the scene?

#

nvm got it!

swift temple
#

ayy tight!

shut pilot
#

Transitions are objects that connect states and provide a mechanism for the state machine to change from state to state right? What controls how Transitions to execute?

trim hatch
#

should melee attacks be put into state machine behaviors in the animation states

jade dew
#

@shut pilot the transition has settings that control its speed, blending, etc

#

and conditions

#

a transition will trigger if the conditions are satisfied

#

if it has no conditions, it will rely on the "has exit time"

#

if it has neither, it is not considered a valid transition, and will be ignored

twin musk
trim hatch
#

so I have a death animation state

#

do I need to make every state transition to death?

#

or how do I make every state go to death?

rapid kiln
#

@trim hatch I think you can add an 'any state' node and have it transition to the 'death' node?

#

maybe it just exists by default

trim hatch
#

How?

#

So every animatin transitions to anystate?

torpid plank
#

Could anyone help me out with this? (showing Animator at the start, 20s of loading after sorry for that)
The character's upper half wiggles after slashing with the sword. Why would this be? Characters and animations are Generic. Let me know what other information you'd need.
Appreciate any help.

rapid kiln
#

@trim hatch I'm pretty sure that if you want to be able to transition from any state to dead, you can just make a transition from anystate to dead state

torpid plank
#

Okay, issue is fixed

languid peak
#

i had to increase my characters size by 10x real world scale so the cloth simulation works, is this going to affect animation at all? should i rescale back to real world scale?

hoary crown
#

it does it with any rig.. that example is with 0 weight on 1 rig that's just a 2 bone IK on a foot

fathom frigate
#

Is there a way to "attach" a piece of clothing to a character that has extra bones/skinning info?

#

I want the bottom of the hat to be skinned to the head bone, but i want some extra bones in the hat only

trim hatch
#

so how do I go to any state from another animation state?

hybrid tinsel
#

@fathom frigate Make a head bone in the hat and then parent that to the head bone of the character?

fathom frigate
#

@hybrid tinsel Thanks! That's the first step. But I also need skinning data applied from both rigs to the hat. I think I figured out a workflow and solution, with duplicating the base rig with new hat bones and then programatically reconstructing the vertex BlendWeights and bones array

hybrid tinsel
upper narwhal
#

how the hell do i turn off animation looping in unity 2020.1? i rememeber there was a tickbox called loop, but now i cant find that

indigo vigil
#

So hey

#

First Unity project

#

and rather big

#

How do I make smooth optimized models... how to optimize them? and how many vert should they have?

hybrid tinsel
#

@upper narwhal I haven't moved to 2020 yet but have you checked the inspector for the animation file?

upper narwhal
#

okay im so dumb, thanks 😅 i checked a lot of stuff, but not the animation file istelf...

ocean garnet
#

hi

#

I have a character I want to make an animation How do I start making an animation?

hybrid tinsel
#

@ocean garnet What kind of character? 2d, spritesheet, 3d?

ocean garnet
#

2d

#

@hybrid tinsel

hybrid tinsel
ocean garnet
#

what is this?

sudden remnant
#

how do I mirror an animation in the X axis inside a blend tree?

#

outside the blend tree it works, but inside the blend tree I don't see the option

#

like I made a walking right animation and I'd rather just mirror it than make a new one

swift temple
#

a cheap way is to set transform.scale.x to -1

sudden remnant
#

haha good idea

hybrid tinsel
#

That is my preferred way, too.

#

If it is a sprite with no child objects, you can just hit 'flip x' in the sprite renderer.

pale dome
#

I drew two different sprites for a running and idling skeletal animation. But because the skeletal animation are only usable with their respective sprites, I can't put them into the same character, any solution please?

hybrid tinsel
#

@pale dome the rigs are totally different, or...?

#

When I have multiple rigged objects that have to be synced together I put them all under a main object that holds the animator. Then I can just enable and disable objects as needed.

mortal yarrow
#

Hey There im a complete Newbie and i need help to get my jump animaation to work

#

the jump script works, but i cant get it to work that when he jumps the animation started

pale dome
#

Haven't thought of that, sounds like a great solution to my problem, thanks pinballkitty!

keen zinc
#

sorry for reuploading thrice i wanted to change the format and fix it

hybrid tinsel
#

@keen zinc double click on the part you want to add geometry to to select it, or use the menu in the upper right.

#

Also your video doesn't seem to have anything happen

keen zinc
#

Rly it's working here both on PC and phone

#

When I selected them one by one it didn't move any thing

keen zinc
#

Also the upper right menu is for bones
My problem is I can't skin the bones on the character (make both move together)

keen zinc
#

I'm using a PNG if that matters

hybrid tinsel
#

@keen zinc Did you make a mesh and apply bone weights?

#

And yeah, if anything happens at all in your video the quality is too low to see it

#

Just looks like a blurry still image to me

hybrid tinsel
#

To make them move with the bones you need to draw a mesh around each piece and weight the points of the mesh to the bones.

hybrid tinsel
#

@formal urchin is it an imported animation?

#

If so, you can just choose the loop time.

timid ocean
#

hi!! im pretty new to unity's spritesheet animation system and am trying to decide whether to handle it in my player script or in unity's crazy built in animator. any recommendations from those more experienced??

#

i have a whole set of animations for my existing player states and am at the point in my demo where id like to implement them

#

my main stumbling blocks are implementing non-looping animations and having different versions of my players run cycle smoothly transition between one another

swift temple
#

learning the animator component seems like a good idea!

#

it's really easy to find tutorials on it too

#

,, if only so that you don't have to drag in every single frame of your animation to a script's inspector heh

timid ocean
#

fair enough lol

#

ill look around a little, might be back if i have more specific questions!! thanks

swift temple
#

good luck!!

supple moon
#

Hello everyone, I have an inquiry about animating in Unity, please point me to the correct channel if this is not the correct one.
I’m working on an 8-Bit style pixel-art game. Sprites and frames all the way. Thing is I haven’t been able to get 2 animation behaviors just how I want them.
I’ve tried using the built in Animator System, I wrote Scripts with the help of the internet and now I ended up using an Extension called “Animancer” (which I really liked). When one animating system solves one of the problems, then I don’t know how to solve the other one, or vice-versa.
Here’s the things I’m solving for (I’ll use Mega Man as an example) …
First: How would I go about making an animation start with a specific frame, or part of animation and then loop between another specific part of the animation without going to those starter frames?
Second: If I have two animations one being running, and one being running and attacking, and they have the same number of frames, how do I transition from “running” frame 3 to “running and attacking” frame 3, and continue looping on the current animation.
NOTE: Like I said, I kinda managed to get this working using “Animancer” but the way I did was completely “hacky” and not sustainable. I know there’s a lot of things I’m not seeing that are making this harder than it needs to be…
EXAMPLES Below…

upper warren
#

can i have help getting a custom anamation for my VR hand

#

i want a custom grip anamation when you grip a gun

#

how do i start

swift temple
#

@supple moon this is gonna sound janky but one way to do it is to have a completely separate animator state and animation for those one frame startups

#

the animator component is hard to work with if you try to play animations partially

upper warren
#

@swift temple can you help me with my anamation?

swift temple
#

soz my knowledge of rigging isnt solid at all

#

for 3d anyways

upper warren
#

well ill do the rigging i just need to fix some probelms

swift temple
#

uhh no promises but i'll see what i can do!

#

oh my goodness gracious :immediate regret:

upper warren
#

i dont know why i cant set the pos

#

why i cant set anything

swift temple
#

it says it's read only but as for why ive got no clue

#

m gonna read up

supple moon
#

@supple moon this is gonna sound janky but one way to do it is to have a completely separate animator state and animation for those one frame startups
@swift temple Hey! Thank you. Actually, my first solution for the first example was something similar to what you mentioned, I used a different state for the "STEP" animation and when it finished it went into running, I think it worked well enough. Using the "Animator" I go stuck with the second example, as I never figure out how to make that transition with Animator or Scripting...

swift temple
#

ooh nice! and oof yeah that's true

#

is it possible to export the part that changes when attacking separately?

#

because megaman's body doesn't change, just whether his cannon is extended or not

lean bobcat
#

Why does this not work, has it changed in Unity 2019.3, I'm trying to load an Animator controller but it doesnt seem to be possible: animator.runtimeAnimatorController = Resources.Load("Assets/Animation/Ferrari.controller") as RuntimeAnimatorController;

swift temple
#
  • so movement directions would only affect body animations, and attack inputs only affect arm animations
#

@lean bobcat what error are you getting?

lean bobcat
#

Thats the weird thing I'm not getting any errors

swift temple
#

huuuuuuuuuuuuh

#

spamming debug statements isn't getting you anywhere either?

lean bobcat
#

It just leaves the controller empty when I run it

#

spamming debug statements isn't getting you anywhere either?
@swift temple no

swift temple
#

does Debug.Log(Resources.Load("Assets/Animation/Ferrari.controller"); print null?

#

oh wait im dumb

#

please try Resources.Load<RuntimeAnimatorController>("Assets/Animation/Ferrari.controller") instead of using an as statement!

supple moon
#

@swift temple I think I see what you mean... like maybe attaching the arm as a separate GameObject that gets animated by itself???

swift temple
#

yep! if the arm only responds to attacks and the body only to movement, you've made your job a lot easier!

lean bobcat
#

does Debug.Log(Resources.Load("Assets/Animation/Ferrari.controller"); print null?
@swift temple yeah it just says Null

#

please try Resources.Load<RuntimeAnimatorController>("Assets/Animation/Ferrari.controller") instead of using an as statement!
@swift temple ok ill try

swift temple
#

oh waitatitititi

#

i said that assuming it wouldn't be null

#

actually you know what go for it anyways im kinda curious

lean bobcat
#

please try Resources.Load<RuntimeAnimatorController>("Assets/Animation/Ferrari.controller") instead of using an as statement!
@swift temple it still says Null 😦

swift temple
#

dammit

#

mmk im gonna test some stuff on my own, and i'll let you know if i find a solution!

lean bobcat
#

Thank you so much!

swift temple
#

this is assuming ferrari.controller is actually on that file path heh

#

no promises but i'll do what i can!

lean bobcat
#

this is assuming ferrari.controller is actually on that file path heh
@swift temple yeah it is

upper warren
#

ok so im starting from scratch for the anamation

#

is there a way to bulk add propertes to an anamtion

#

like take a snapshot of the current model

#

i have this

supple moon
#

yep! if the arm only responds to attacks and the body only to movement, you've made your job a lot easier!
@swift temple Cool, cool. I'll look into it. Thank you so much for your help friend.

swift temple
#

np, hope you get it working!!

#

@lean bobcat i figured it out! you're gonna have to move your animations folder here tho

timid ocean
#

damn, is that really the only way to do something like that??

swift temple
#

under a folder called 'Resources'

timid ocean
#

I've got work to do @_@

swift temple
#

and then ye just do a Resources.Load<RuntimeAnimatorController>("Animations/Ferrari");

#

without the .controller

#

@timid ocean do something like what? splitting the movement and attack anims?

timid ocean
#

yep, im after something similar with aiming while running

#

except i have an extra transitional frame so it's even more to handle lmao

swift temple
#

ooof yeah i really hope there's a better way too

timid ocean
#

i'll see what i can dig up

upper warren
#

is there no preview?

supple moon
#

@timid ocean When I read your post I had a feeling you were trying to do something similar. Let us know what you find. I tried a bunch of things. You can check out for free the extension called "Animancer" in the Marketplace and I also tried some scripting techniques I got from this articles: https://www.gamasutra.com/blogs/JoeStrout/20150807/250646/2D_Animation_Methods_in_Unity.php. Animator/Animancer/Scripting Base, I think they all have their answers, but just have to find it.