Hello. This is my first time asking a question. I’m still a Unity newbie but have been a developer for years. I’ve spent hours trying to figure out how to successfully perform what I would think would be a simple task and, no matter what I’ve tried, it hasn’t done the trick. I would post some code but I have nothing that is working.
Here’s what I would like to accomplish. I have a room with a monster object in the far corner. I have a trigger in the doorway. When the FPC walks into the trigger I want the monster object to move across the room to a point in front of the door and stop. At that point I want to change the monster’s built-in animation to change from it’s “run” animation to it’s “attack” animation. That’s it. Move from point a to point b while running. Stop at point b and switch to the attack animation.
That’s it. Nothing fancy but it’s driving me crazy. I’ve spent hours working with different lerp examples, move examples, translate etc. I can get the monster to move correctly using the animation editor, but I don’t know how to switch the animation from “run” to “attack” when it reaches the destination from within the animation window.
Thank you in advance to anyone who can offer some insight and guidance. Have a great day!