I am making a game where I need to be able to teleport 1 to 6 nav-mesh agents to valid spots to the sides or slightly behind to the sides of the player during dialogue sequences. I have spent days on this and am no closer to getting it right. I would appreciate any help you can give, I feel like I have tried everything
1.) It must be within a designated target area around the player (For example, two box colliders to their left and right
2.) They cannot collide with each other or be within a certain proximity (they may have slightly different sizes, so predetermined grids will not work)
3.) The spot must be on a valid nav-mesh position they would be able to move to normally
4.) They will prioritize spots that give them a clear view of a target (through raycast or other methods) in front of the player (such as an npc)
I am at a loss, and I can’t find anyone else having an example of a similar system.
(edit. I got the system working somewhat, just need help now with a workaround where the node locations cannot be through/behind other objects such as walls).