Hey all. I’ve began work on my ai cause I wanna start making ti so my buildings will build from the ai but I’m running into an issue where my target location is appearing invalid.
Basically I spawn the ai with a button then place a building that needs constructed, they run to the entrance and begin construction. The target location keeps showing up invalid and the behavior tree won’t even execute the command.
For some reason setting up is valid nodes also seems to do nothing. I’m really at a loss here cause I don’t understand why it’s not working, additionally the building can’t be blocking the navmesh/entrance as the “entrance” is the sphere in the middle of the collision box.
Check your blackboard and make sure you spelled “Target Location” EXACTLY as it is spelled in the blackboard, otherwise it will think its a different variable. Even if there is one “space” extra in the variables it won’t recognize it.
Also where do you set the proxies array? If that doesn’t have at least 1 element your branch node will always execute the “false” and your behavior tree will never “finish” execute, which is required for a sequence node to move to the next task. So if it can never “finish” execute because the array is empty, no value is ever set for the target location and the BT stalls on that one task.
I don’t think that’s the problem though cause the entrance is actually outside of the mesh’s bounds by “50”. Only thing that could be blocking would be the collision box but it’s set to ignore everything.
If you open your house mesh and check collision to see where the boundaries are is the collision a foot or two away from the house like the area blocked out of the nav mesh? If so you need to redo the collision in the modeling software to more closely match the house, move the sphere further from the house or check the option on the mesh for “use complex as simple” collision (more expensive as collision is detected per poly)