- Home /
Simple AI and Animation
Hello i'm making my first full fledged game and i'm having trouble with the AI I'm thinking just making a Way point where the Controllable Player(CP) starts but that will cause all my "zombies" to huddle together and end up at the same spot so if someone could direct me on where i can find some information on patrolling AI and random path finding or help me with code that'd me great. Also my "zombie" is animated and walks but it "jerks" back to where it started and repeats without going anywhere is there anyway to smooth out the animation and smoothly switch between animations for example when my ray cast on my CP hits an object with a collider(the zombie) the animation will go from "walking" to dead". If anyone can help me that be much appreciated.
Answer by Cornelis-de-Jager · Apr 05, 2018 at 02:40 AM
Allot of different questions. But lets start:
Patrolling:
Are you using the NavMesh system? if not read up on it. It will make your life easier. As for patrolling, here is a good tutorial on it: https://www.youtube.com/watch?v=Erpp9WgbasI
basically you will have a target location they walk to. If the yreach it you need to change the target. Then you also need a new script that detects if the player is within a certain range. If he/she is then you need to swithc the target to the player.
Animation: If you can post a picture of your animator that would be really useful. However, it sounds like you need to create a new transition from your walking model to itself then play around with blending them. (to do that you click on the transition itself and it will come up with a little menu you can use to adjust it)
Answer by jaguilar0047 · Apr 05, 2018 at 04:01 AM
@Cornelis-de-Jager Thank you I will check up on that video and yes I do have a navmesh and my scene is baked. For my animation i used Mixamo to create an animation for my zombie(I have a T-pose and walking animation) I was gonna try to add an animation controller and mess around with the settings but I am not very knowledgeable on animations and animation controllers so if you have a tutuorial on that as well that’s be awesome. Thanks for taking the time to respond to my questions!
Your answer
Follow this Question
Related Questions
Collider Vision AI question. Solved! 0 Answers
Collision occurring when it should not! Help! 1 Answer
first person controller falls down through the floor of my imported house 1 Answer
Ragdool walking through objects 1 Answer
Animation lag 2D 0 Answers