so, here's what's happening i have attached this animator to an object and in this same object i attached a script that theoretically should order the object to do this animation inside the animator whenever the tagged object touches it problem is it doesn't work, the process just does not start i have verified for sure that the tagged object does indeed touch the scripted object for long enough where its impossible that it would not detect it so im gonna assume im doing something wrong here but i cant understand what
I recommend you to check the following things: - Does your animation have frames? If it does, Is the sample count above 1? - Does the animation you want to play have a speed above 1? - Does your state contain the animation you want to play? - Is the GameObject with the Animator active? Is the Animator on the GameObject active too? - I see you used " to specify the animation name, check it on both the Animator and the Script, maybe you misspelled it? -You could also check the collider and the tag on the objects too.
A quick tip: Instead of collider.gameobject.tag == "Something", use collider.gameobject.CompareTag("Something"). I heard its a bit better than just == these guys
I also recommend you to have the model with the Animator under a GameObject. So that the main GameObject has the scripts, along with the model having the animations. This will let you move it around a bit more freely! Also, be sure to ask here anything regarding Unity. I can probably help out with the more basic & intermediate stuff, probably? Do NOT try to ask around the Unity Forums, you rarely get an answer, if you ever even get answers. You can search up forum posts they already answered, but I don't recommend writing posts there, do it here instead
damn really? is there not a bigger community where people exchange advices other than the unioty forums that you visit?
well back on topic
-yep, if frames are what i think they are. and no, i can't even find a way to count them. -yep -yep -yes and yes -watching the animator while i play the game the animation technically is working, but it won't show -already did
at this point it must be something related with the sample i think
@timestopdev Weird, your Unity version's Animator window doesn't even show the Sample rate! I guess it must be 60, the default value, which is what I use. But...the Animator won't show? It should get the Animator because you cant assign it by yourself because it's not public.
Hmm...Maybe you could put a whole bunch of Debug.Log commands that will print stuff to the console. So when you press a button, you could write "Debug.Log("Button pressed!")" or something like that. Put that over the parts of the code where you think it would be going wrong, tho I don't think its actually the code. It seems fine to me at least. But you can try. Also, sometimes you might get stuck at the smallest little details because it went over your head. Happens to me all the time