- Home /
Baking a NavMesh on the Bottom of Objects,How to bake a NavMesh on the Bottom of an Object
Hello, I am creating a puzzle game when the two characters are on two different sides of the same plane. Each side interacts with the other in order for both sides to reach the end. I have created a NavMesh for the topside of the plane, but I cannot figure out how to create a NavMesh for the bottom. I have tried creating a separate plane and flipping it but it doesn't work. Is there anyway to achieve this result? Thank You ,Hello, I am trying to create a puzzle game where the two different levels are on opposite sides of the same plane and they have to interact with each other in order for both of them to get set free. I am having no problem baking a NavMesh for the top side, but I cannot figure out a way to bake one for the bottom. I have tried creating a separate platform and flipping it but it does not work. Any suggestions would help! Thank You
Answer by Slastraf · May 29, 2018 at 07:01 PM
Wow. thats a really good question. I dont think you will be able to solve this easily with the built in nav tools. You would need to program it yourself. I would go with some sort of " A* " algorithm and split a grid which dimensions have 2x1 in the middle and "wrap" it around the two planes. if the character overlaps the line in the middle make him rotate. Each point in the grid represents a point in the real world on or under the plane.
EDIT: I actually taught of one more. Make two planes parallel to each other, and the lower plane represents the navmesh for the "under" side. Now have a gameobject with the nav agent scripts on it walking towards the player, and make the enemy rotate when its lower than a set height. you would need to somehow connect the planes by making a slope on the top one which goes down on the second.
Could you explain what you mean when you say "have a gameobject with the nav agent scripts on it walking towards the player, and make the enemy rotate when its lower than a set height. " I just need more of an explanation. Thank You
Answer by Unified2000 · May 29, 2018 at 07:04 PM
I don't believe it's possible, but you can have two characters on the top and hide the 2nd by turning off its renderer. You can then create a 3rd character that simply mirrors the 2nd character that's hidden above.