You are browsing as a guest. Sign up (or log in) to start making projects!

7h 38m 56s logged

Dev Log: Fixing NPC Door Navigation IssueProblemWhile testing the new NPC AI system, I noticed that enemies were able to find the correct path using the NavigationAgent3D, but they would get stuck when trying to walk through doors.The NPC was not failing to find a path. The navigation debug showed:Navigation map was readyPath count was validThe NPC had a target positionThis meant the problem was not with the NavigationAgent3D or the navigation mesh.InvestigationI tested multiple possible causes:Rebuilt the navigation meshChecked NavigationAgent3D settingsChecked the NPC movement codeChecked collision sizesChecked the NPC pathingAfter debugging, I found that the issue was caused by collision layers.The NPC and the door were using the same collision layer, causing the NPC’s collision body to interfere with the door collision. The navigation system could see a valid path through the door, but the physics engine was stopping the NPC from moving through it.SolutionI separated the collision layers so the NPC and the door no longer incorrectly blocked each other.After changing the collision settings:NPCs could correctly enter and leave housesNavigation paths continued workingDoors no longer trapped enemiesMultiple NPCs could navigate the level correctlyNew Level ProgressI the Current AI Features The NPC system now includes: NavigationAgent3D pathfinding Enemy chasing and a behavior Anger system based on player messages that NPC can respond to in the chat UIMultiple NPC support with name targeting i agian cant uplode a video

0
3

Comments 0

No comments yet. Be the first!