Neon Trigger Devlog #7 - AI Jumping



Hey everyone, welcome to our seventh Devlog for 'Neon Trigger'. My name is Thomas and I am back today as our lead gameplay programmer. In this update I will go through our AI jumping logic, a major step in achieving human like enemy behavior. While a big step, it did not come easy, our use of root motion for enemy movement combined with NavMesh logic makes it so jumping is not possible by default as many settings interfere with each other.
With this in mind I created many NavMesh links that allow the enemies to "jump" from one part of the NavMesh to another primarily across height gaps or over obstacles. With a large part of our first two rooms being on rooftops with a lot of height and jumping involved, this logic is necessary for combat to feel complete.
The code for the is actually somewhat simple, NavMesh agents have the capability to tell when they are on an OffMeshLink and also accept these are a normal part of the surface so pathing is not an issue. When they detect they are on a link it will trigger the following to happen.
Essentially, what this code does is it takes the start and end position form the link, then lerps the transform accordingly on a parabolic curve to simulate gravity. This is all done while setting the proper setting like disabling certain agent properties and re-enabling them when they land as well as setting isJumping for the AI Controller to play the proper jumping animations. These are cycled through when isJumping is set to false. When this triggers, animator goes to a jumping or "floating" idle animation that plays for the legs and then depending on how long isJumping is true, a longer landing animation will play or they will go back to their normal state.
Allowing the AI to jump makes our gameplay feel much better as more of the map is unlocked while also making the AI more fun and complex to fight. With such a fantastic level design, these capabilities complement what my team has done quite well.
With the project soon coming to a close, I love where we are currently at and am grateful for such and expansive learning journey this has been for me. Thank you so much for reading our 7th Devlog update and stay tuned for our final build in the next couple of weeks.
Neon Trigger
Status | In development |
Authors | AidanBrennan55, taepsteinnelson, stopicantaim, HappyCarbs, gojalgo |
More posts
- Neon Trigger Devlog #8: How to create a dissolve effect in Unity4 days ago
- Neon Trigger Devlog #6 - Shaders and Post Processing for Unity18 days ago
- Neon Trigger Devlog #5 –Danger: Big and Small25 days ago
- Neon Trigger Devlog #4 – Weapons & Character Modeling32 days ago
- Neon Trigger Devlog #3 - Player and AI Controllers38 days ago
- Neon Trigger Devlog #2: How to create a interactable 3D UI Element in unity39 days ago
- Neon Trigger Devlog #1 - Whiteboxing and Narrative46 days ago
Leave a comment
Log in with itch.io to leave a comment.