#🏃┃animation
1 messages · Page 63 of 1
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?
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
lol haha, yeh it looks like. i moved it to lastupdate and it works atm
nice man
but maybe that's just a snapshot 😄
damn i can even solve problems that i dont understand
@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 ?
@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.
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
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 ?
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
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
Well, your code is already deciding which image to use.
The clip doesn't really need to know that
Wait
Actually the animation of the bounce are 2 separated clips
Forgot about that, lol
just a general question, im trying to set up lip sync for a pal of mine, what's the easiest way to do so?
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.
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!
@acoustic tulip what if you made the arm a particle 🤔
I was tired of the old animtree-based turn in place animations, never got it to work decently.
The new system uses root motion animations from Mixamo, adapted to the idle positions of the game characters.
I am not sure to use them in the normal movement (without weapons), be...
How can we turn player in place with animation like this ?
@wheat pendant Don't cross-post
If an animation has 2 exit transitions, both to a different animation, but containing the same exit condition
which one will be chosen?
Or what if 2 different exit transitions are met at the same time?
@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?
you can set a mesh to emit as a particle, if you google "mesh particle emitter" you should find what you need
alrighty! I'll give it a look! Thanks!
I was tired of the old animtree-based turn in place animations, never got it to work decently.
The new system uses root motion animations from Mixamo, adapted to the idle positions of the game characters.
I am not sure to use them in the normal movement (without weapons), be...
how ro implament 180 rotaion aanimation like this and how plaese really need it
Haven't you been given a bunch of tutorials in the other channel covering the topic?
Can anyone help me how to play the animation attached to child? My script is attached to parent...
@twin musk You can reference component from the child object and play it
@twin musk You can reference component from the child object and play it
@celest crag I tried but its throwing null expression
You need to assign it in the inspector if you are serializing reference.
You need to assign it in the inspector if you are serializing reference.
@celest crag Thanks let me try it
@acoustic tulip you could try rendering out each arm on a seperate layer and doing some post processing in after effects or something similar.
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?
Also curious ^, I just tends to do AnyState -> All of my animationStates based on bools for this kind of thing lol. Not neat.
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
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?
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
Well it is a template for a basic fighting game
for now, I'd like to do one animation each input
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
I see
thanks
Should the Punch have exit time checked on for the Punch->Idle transition?
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
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
I just open the Animator Controller window
and the Animator tab down below remains selected while I run the demo
damn ty that is so handy
Oh i get it
Does anyone know, with Animation Rigging, how can i execute some code after the animator updates but before the rigging constraints are applied?
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.
@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
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
yup
perhaps u can write an animation job
in the jobs system
since animation rigging uses that
idk tho
yeah, seems like its the only way out really
Can anyone tell me why my animator is doing this? The animator is attached to an instantiated object, and when I place the object by hand it works perfectly. That bool isn't being turned off by me by the way, seems like the animator is resetting every frame or so, despite there being no code causing it to do this
literally the only time the animator is referenced
where is OnTreeChopped called?
in another script @jade dew, but I don't think it's relevant
might be
uhh
nah, I don't need that other transition
i still think its bc ur chopped bool is constantly flipping, its probably bc of the way ur setting it
setting it to true?
yea like, the code where ontreechopped is called
but wait yea
thatd make it be true forever
huh
good point
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
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
k I got it fixed
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
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
@sharp marten Is the collider in the wrong place?
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
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?
she is hovering in Scene as well, she pops up when i hit play
Right, but what about the collider and root?
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.
You might have gizmos hidden?
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
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 🙂
Each of those frames is treated as a single object, you can place them in an animation timeline in sequence
Thankyou Very much, I'm so embarrassed I didnt realise it!
Nothing to be embarrassed about. You posted a good question and provided the info needed to answer it. 😄
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?
@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.
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.
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?
how do i fix an issue where i press the space bar it pauses unity?
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
do you mean that only the person executing the animation can see it?
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
@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
Maybe run the client in the editor and see if the person that starts the animation has his animator set in his animatorcontroller?
@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.
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
Did you check the input manager?
Generally each input has separate settings for smoothing
ah
I've never tried a controller with unity so I dunno. 😄
lol fair
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
How do i fix these?
@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
alright thanks
Good luck, and if you find something out please let me know!
I should probably just learn to use an external program for animations to be honest haha
Beats being trapped in Dark Bramble at least?
yeah would be a way to solve it haha
...er, dunno if that status you have up is appropriate for this place. o.O
hey how can i make that the idle animation doesn't block the attack from happening ?
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
well i noticed it stops (attack anim) when activating other animations
my animation is stuck at the first frame
its triggering perfectly but not playing
any ideas?
Are you triggering it every frame? @twin musk
how to import images for an animation in UNITY pls
How do i make it "animate it self" you know like he did https://youtu.be/--GB9qyZJqg?t=475
I created a little generator for coming up with (mostly terrible, but occasionally interesting) game ideas. I then tried making a little game based on a generated prompt about ghosts and beekeeping.
You can try the idea generator online here: https://seblague.github.io/ideage...
i cant find any tutorials
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!
@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
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!
Why is my OnStateEnter of the next state firing before OnStateExit of the previous state? Is this default behaviour?
@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.
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
Yeah, not sure what the default is, but it is definitely not zero.
What declaration is the correct syntax for implementing the ByTheTale.StateMachine.MachineBehaviour’s AddStates function?
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
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?
@covert acorn I just use the same timing for all my animations. I work in 2d though.
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?
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).
Actually, I think I figured it out
I'm now having trouble playing an animation using an animator through a script
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?
Well, Can I show code here?
Yes. If it is a couple lines you can enclose it in three `. If it is larger than that, use a pastebin link.
Yep
Animator m_animator;
void Start () {
m_animator = GetComponent<Animator> ();
}
m_animator.Play ("layer.stateName");
I know my Markdown 😛
^_^
What confuses me is, m_animator.Play(...) isn't activating yet not reporting errors
Um, did you specify a state name?
I generally don't trigger animations directly from code.
We are triggering them on a run sequence
Usually I use a trigger in the animator
Or a float, or a bool, etc
And let the animator figure out what to do
oh, how would you set that up
Well, for instance, animator.SetFloat("Speed", speed);
oh
Doesn't play usually take a time as well to make sure it starts at the beginning?(I'm not sure about that)
¯_(ツ)_/¯
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
I am setting a bool now for the animator, how do I access it within the animator?
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
hm
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 😄
Thanks @hybrid tinsel. I figured out my own style but the triggers definitely helped looking for.
How'd you do it, if you don't mind my asking?
Once I get it 100% working, I'll show you 😄
@hybrid tinsel I got the start working using a trigger, but can't stop it
How do you stop it?
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
Just set a conditional transition that uses the bool being false
You have to toggle a bool via code.
Triggers automatically are set to false after being read by a transition.
How do I get facial animations to work in Unity? The animations are humanoid and done in Blender. Thanks!
@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?
Right, so how do I make facial animations work on top of body animations? And they are bone based.
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)
playerBody.GetComponent<Animator>().Play("playerSlide");
any clues why that doesnt work ^ ?
it doesnt play
animator
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
how about use animation lists?
oh i got it to work, forgot to tick "legacy animation" xD
why isnt that automatic tho ):
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?
@viral pollen Did you import any animations with the model?
Is it a humanoid rig or a generic one?
@hybrid tinsel Thanks for your help!
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
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?
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?
@hybrid tinsel no animations and it is a humanoid rig.
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.
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
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.
the last frame of the enemy death animation is staying on screen forever, how to fix this? plz help
@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?
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.
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
@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
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
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
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
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
so im trying to add my sprite to unity but when i do i get odd artifacts and different colors
normal straight from ps
screen shot from unity
in other frames its worse
any way to fix this?
heres a pic of all the frames in unity
@twin musk turn off compression in the image import.
is using empty gameobjects as containers Actually the only way to change pivot points for things??
@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.
@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
Skewing in what context?
well like this essentially, this is how I had it at first https://i.gyazo.com/5a4881a108c05a2d28b2d851c0e1182a.mp4
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
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
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.)
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?
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.
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 😄
@hybrid tinsel yep that works thanks
When are you supposed to reset an animation transition trigger?
@warm ore Triggers reset when a transition is triggered by them.
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
@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
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
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 😄
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
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
@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
Awesome. Thank you!!
you are welcome. 🙂
????
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
@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.
i copied rifle idle animation. now it is called rifle idle 2, but still when i open the animation, it is read only
Um, it looks like you duplicated the entire fbx file, not the animation
select the actual animation inside the file and duplicate(ctrl-d)
if i make a 3d model in blender do i also animate it in blender?
@hushed ember you can animate it in blender, in mixamo, in unity, or in anything else really
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?
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
Hmm... Seems like it may be because Timeline skips frames when you scrub...
Or not. Who knows.
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?
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?
@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
Nope, I animated everything in Blender
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?
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
Someone can explain me how to apply tha modify that an animation do on an object?
@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.
Thanks
@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.
@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
@deep hazel for which renderer?
Um, both of those are SRP
I don't think any of the standard shaders show backfaces. Maybe particle ones?
Sorry, this is why I really hate them introducing such confusion.
no worries
There is a built in renderer, and then there is the scriptable pipeling(SRP), and srp includes URL/lwrp and HDRP
it's the built in renderer
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
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?
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.
thanks
i have the weirdest bug ever
i have this animation
i took one from mixamo and edited it
its now called Rifle Aim Custom
i go to it when i aim
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
just ignore my question it is too vague
Why does this not save the rotation to the keyframe? like first it changes it's values, but when i go to frame 1 and back to frame 0, the values are gone
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
@hybrid tinsel restarting unity seems to have fixed the problem somehow
ah good
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?
@twin musk An animator will affect anything lower in the hierarchy than the animator UNLESS that object has its own animator.
Animated some art by Esmahasakazoo over at Whales and Games https://i.imgur.com/umSWSct.mp4
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?
@vale geyser what facial animations?
I had a problem with facial animations for my humanoid rig in unity?
@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 😄
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
So they did work, and then they stopped working?
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.
@vale geyser
perhaps read up this one
idk either but i think these are used for facial anims
@jade dew Thx, I'll check it out.
@vale geyser How do you have them set up? Do the facial animations preview properly?
Do you have them on a second layer?
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?
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?
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
@hybrid tinsel They were on a second layer, they don't preview at all either.
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)
Hi, why mixamo animations are not working in new unity?
@vale geyser If they won't preview at all there might be some problem with the animations themselves?
@unique pulsar I'd ask in #🔀┃art-asset-workflow personally for that.
@hybrid tinsel Am I allowed to send a screenshot? Just to show you.
@vale geyser It's fine to post media related to the question, as long as it doesn't break #📖┃code-of-conduct .
Ok thanks!
Here are the facial bones
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?
To make sure you are not missing something you can follow any of the tutorials on youtube illustrating exporting to Unity.
That's a good point, but literally everything else works as wanted. It's the face only.
The bones ARE imported, right?
Can you open the face animation in the unity animation editor and see it there?
Hey!
I have a problem where the shoulder of my model in unity is deformed
But in blender
It looks fine
@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.
She totally vibin doe
@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?
Like you told me some time ago, the face anims are on a separate layer. And it's on the bottom of the list.
Ok, so that's how it should be
hm
Can you set it to play just the face animation rather than the body?
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.
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?
@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
I will just use another model for now but thanks still 🙂 @hybrid tinsel
@hybrid tinsel Just tried without masking it out, still doesn't work.
hm
This is a super weird problem XD
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?
Weight was 1, and where do I "keep extra bones". I'm not super experienced with unity.
in the file import settings
Thanks, I'll look at that right now.
In my import setting there are these animations
and stuff
Where are they and how do i get access to them?
@hybrid tinsel That did the trick. Thank you for your persistence.
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
this is his bone structure in the humanoid avatar
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?
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.
uncheck "apply root motion" on the characters animator controller
Thank you so much 🙂
does anyone have a run animtion sprite sheet i can look at?
i need to use it for reference
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?
@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
I have my animator controller on my player
My idle animation is playing
but I don't see the player idling?
@snow sinew Not sure what you mean...?
This is a screenshot of one of my execution animations/cartoons
My executions animation
https://youtu.be/kKQ34hklvTU
Charlie Francis' was captured by Two of Lord Hippy's troops and then beheaded along with a prisoner of the Clo Clan called Prive who was sawed alive.
𝙲𝚕𝚘 𝙲𝚕𝚊𝚗'𝚜 𝚟𝚎𝚛𝚜𝚒𝚘𝚗
https://youtu.be/16rkeRqlvSg
𝙲𝚕𝚘 𝙲𝚕𝚊𝚗'𝚜 𝚌𝚑𝚊𝚗𝚗𝚎𝚕
https://www.youtube.com/channel/UC-wMiHdW370NyfDiC1YnlHA
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
@warm ore could use a collider, could use raycasts, could use timeline to sync them
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?
@spice mirage if you're using raycasts to detect the ground, it might be better to switch to collision callbacks
https://docs.unity3d.com/ScriptReference/Collider.OnCollisionEnter.html
that way, isGrounded gets updated immediately after jumping
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
@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
Pastebin.com is the number one paste tool since 2002. Pastebin is a website where you can store text online for a set period of time.
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
do you think you could set your chara up like this?
and put this on the legs: https://hastebin.com/xeqezureme.cs
alternatively you can just crank checkRadius lower and lower until the problem goes away 😅
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?
Fixed
@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
Also, I forgot to show you before, but the event in the code is meant to invoke OnLanding();
Yep
?
hang on, i'm actually pretty confused why you're using onlanding() as an event
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
did you comment out the isGrounded = Physics2D.Ove... line in fixedupdate()?
Should I just call it when it detects that isGrounded is true?
No that line hasn't been commented yet
try it out! don't worry if that doesn't fix it, i still have more ideas
Alright, thank you so much by the way!
thanks for being patient!
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
hmm in the game view, the collider on the legs is touching the ground, right?
could you enable this and try again?
switching contact pairs to allow callbacks on kinematic and static pairs
@spice mirage also if you use these two scripts, you might be able to get away with not needing to use the onlanding() event
legs: https://hastebin.com/ebadoyukov.cs
chara: https://hastebin.com/ujamefapum.cpp
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??
: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
The settings are exactly the same as the body collider, which isn't going through the ground
Yes
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
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?
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
just swap groundcheck for legs if that's what ur used to
I kept the body collider in the parent object is that bad?
nope! that makes things simpler
i feel like im having a stroke give me a phat minute
YEAH SAME TBH
AFCRKHSTNMXVZWMAOEUZWVXMZOEVWXMWVZQJMkvwzqjmkvzwqjmk
MONEY
holy hell
that took a good ten years off my lifespan
Thank you so much lowercase omfg
gotta admit
that was actually pretty fun
please come to me if you get more bugs! ^^
I'm glad one of us enjoyed this LOL
I will, thank you so so much!!
and you as well!! ✌️
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
Pastebin.com is the number one paste tool since 2002. Pastebin is a website where you can store text online for a set period of time.
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
hi Imake animation 2d game okay
so Im noop very in animation
can give me any video learn me?
I'm animating a material property, but unity animates all materials properties on same object. How can I avoid this ?
@karmic nexus https://docs.unity3d.com/ScriptReference/Renderer.SetPropertyBlock.html here's a decent place to start!
@!_Mars#1230 if you're comfortable with scripts, this should be all you need: https://docs.unity3d.com/ScriptReference/Animator.html
otherwise, here's a nice place to start https://www.youtube.com/watch?v=hkaysu1Z-N8
@karmic nexus https://docs.unity3d.com/ScriptReference/Renderer.SetPropertyBlock.html here's a decent place to start!
@swift temple This is scripting. I'm talking about Unity's animation system
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
thanks
good luck!
if there's another way to go about it, i'd love to know too because this solution is a hassle
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 ...
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?
so, either like this, with the root staying on the ground
or this with the root lifting up the player
@vital blaze I wouldn't do either. I'd have the jump height entirely controlled by script.
Shadergraph + 2d bone animation
Anyone know whether there is a limit on maximum number of states in a blendtree?
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.
pretty solid!
Thanks!
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
yeah i saw that lol
alright
@rain flume Is the transition actually triggered?
i have it triggered when the Shoot boolean is set to true
I am asking whether it is actually being marked as active in the animator
Like, obviously it is supposed to do that 😛
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
I'm having this issue using the Animation Rigging, does anyone knows what may be causing it?
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?
@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?
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
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
Hello EveryBody hope you all doing well
if anyone could help me with my problem please
1 vote and 0 comments so far on Reddit
Question, anyone has a clue why my character moves this weird after punching?
This is the Animator setup:
How is the upper body set up?
@torpid plank its because of punching goes back movement
you should bound it entry or any state
im not sure but worth to look
@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
This is the result right now:
Here is the body setup (it's just default from Mixamo). Also character and animations are Generic not Humanoid.
If the animations are generic, then blending via layer mask might not work right, not sure
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
I'm not sure if this is the right place to ask about state machine behavior
since they're part of the animator component
why wouldn't it be?
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?
Help to support the channel if you are feeling super kind: https://www.patreon.com/dapperdino
Join our Discord: https://discord.gg/sn9xXK4
https://www.youtube.com/watch?v=raQ3iHhE_Kk
https://www.youtube.com/watch?v=6vmRwLYWNRo
Here is Unity's own state machine behaviour ext...
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
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
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?
Any Fix Please
im not too familiar with 3D animation, so i cant help, try googling or something
what's the other problem?
no its the animator problem
oh f
what are you animating with transform.position? maybe it's easier to do with a script
what do you mean by that?
what animation is playing when your chara falls through the floor?
idle
why does your idle animation need transform.position as a property? sounds wack
im using a character rig
oohh
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
How do I retrieve an AnimatorStateInfo reference from the Animation Controller named “myAnimator” in Layer 1.
@shut pilot please try this! https://docs.unity3d.com/ScriptReference/Animator.GetCurrentAnimatorStateInfo.html myAnimator.GetCurrentAnimatorStateInfo(1)
@swift temple thanks!
What script statement can be used in a MonoBehaviour script to get a reference to a GameObject’s animator component now?
Are you pretty good with animation in unity @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!
what does the loop time thing do?
i'm not sure i know what you're talkin about
theres a box in the animation properties panel labeled loop time, does that make it just repeat the animation once its done it once?
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
nice!
How do I make my character not fall over when I put a capsule character in the scene?
nvm got it!
ayy tight!
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?
should melee attacks be put into state machine behaviors in the animation states
@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
hello guys I how make show this coordinates ? bone x y z transform and rotation this file silkroad online animation file i have reader here structure https://github.com/DummkopfOfHachtenduden/SilkroadDoc/wiki/JMXVBAN-0102
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?
@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
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.
@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
Okay, issue is fixed
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?
anyone know why animation rigging would turn
into
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
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
so how do I go to any state from another animation state?
@fathom frigate Make a head bone in the hat and then parent that to the head bone of the character?
@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
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
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?
@upper narwhal I haven't moved to 2020 yet but have you checked the inspector for the animation file?
okay im so dumb, thanks 😅 i checked a lot of stuff, but not the animation file istelf...
hi
I have a character I want to make an animation How do I start making an animation?
@ocean garnet What kind of character? 2d, spritesheet, 3d?
what is this?
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
a cheap way is to set transform.scale.x to -1
haha good idea
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.
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?
@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.
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
Haven't thought of that, sounds like a great solution to my problem, thanks pinballkitty!
sorry for reuploading thrice i wanted to change the format and fix it
anyone know how to make it add geometry to the whole character rather that just one (i did the same as in tutorial but this happend)
@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
Rly it's working here both on PC and phone
When I selected them one by one it didn't move any thing
Also the upper right menu is for bones
My problem is I can't skin the bones on the character (make both move together)
I'm using a PNG if that matters
@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
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.
@formal urchin is it an imported animation?
If so, you can just choose the loop time.
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
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
fair enough lol
ill look around a little, might be back if i have more specific questions!! thanks
good luck!!
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…
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
@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
@swift temple can you help me with my anamation?
uhh no promises but i'll see what i can do!
oh my goodness gracious :immediate regret:
@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...
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
@upper warren https://answers.unity.com/questions/187907/how-to-add-keyframes-on-imported-read-only-animati.html here's a decent place to start but i feel like you'd be able to solve this one faster than i could
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;
- so movement directions would only affect body animations, and attack inputs only affect arm animations
@lean bobcat what error are you getting?
Thats the weird thing I'm not getting any errors
It just leaves the controller empty when I run it
spamming debug statements isn't getting you anywhere either?
@swift temple no
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!
@swift temple I think I see what you mean... like maybe attaching the arm as a separate GameObject that gets animated by itself???
yep! if the arm only responds to attacks and the body only to movement, you've made your job a lot easier!
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
oh waitatitititi
i said that assuming it wouldn't be null
actually you know what go for it anyways im kinda curious
please try
Resources.Load<RuntimeAnimatorController>("Assets/Animation/Ferrari.controller")instead of using an as statement!
@swift temple it still says Null 😦
dammit
mmk im gonna test some stuff on my own, and i'll let you know if i find a solution!
Thank you so much!
this is assuming ferrari.controller is actually on that file path heh
no promises but i'll do what i can!
this is assuming ferrari.controller is actually on that file path heh
@swift temple yeah it is
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
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.
np, hope you get it working!!
@lean bobcat i figured it out! you're gonna have to move your animations folder here tho
damn, is that really the only way to do something like that??
under a folder called 'Resources'
I've got work to do @_@
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?
yep, im after something similar with aiming while running
except i have an extra transitional frame so it's even more to handle lmao
ooof yeah i really hope there's a better way too
i'll see what i can dig up
@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.