Why can’t added cubes added with the add object actuator use a navmesh.Is there a solution to this?
I think smoking mirror builds his own navmeshes, and uses his own A*,
this way as you add terrain, you can loop through the added verticies, and add them to the navmesh,
I don’t know exactly how to do it yet, but I know its using something like
for vert in object.meshes:
They can do, at least in 2.75. I don’t recall this changing recently either. Better upload a blend file.
how do you regenerate the navemesh after you add the patch?
is that in the api?
Press w and x to spawn cubes to use navmesh and navmesh.001.As you can see it does not work.
you are going to need flexible method to detect the new added navmesh,
parent the navmesh to the cube,
use a ray down/forward to detect the cube, and then get its children, your navmesh,
names wont work as there many be more then 1 item with the same name.
The navmeshes are already in the scene.Did you look at post five?I am trying to make a npc that moves a particular type of box from one area to another area.When i tell it to.Like for instance if i tell the npc too move all the green boxes to the blue pads it will.And if i tell the npc too move all the red boxes to the blue pads it will.
have a steering target object, move it to box, on collision with the box your targeting, parent it to the player and make sure its in the right place/orientation
move steering target to new destination, on arival, unparent box
The first part does not work.Because when my box tries to parent to the other box and fails it will stop moving on the navmesh.
I’m not sure what you’re doing, but it seems fine - it’s facing the new target. I’d also advise using my newer script-that one’s a mess.
Read post 9 again please?I forgot to put something in.I do need navmeshes.Because i want to make navmeshes for different types boxes.Because i am using them to avoid the boxes that i don’t want the cube interact with.It easier and simpler that way.
Why can’t added cubes added with the add object actuator use a navmesh
i guess the steering actuator use ever the same navmesh object and probably also the same target object.
the steering simply cannot find the path and do nothing.
make a group -> (cube + navmesh + targets)
and use an empty as spawner
then add the spawner (that add the group) rather than add separately all objects
in this way all references still “locals” (to the group) and should work.
PS: also using parent should keep the right references
so you shoud add only the root parent (as spawner)
if you want the the box be dynamic you are forced to make all as children of box (otherwise the box still static)
in this case below is used the group , the script only change target
multinavmesh.blend (74.1 KB)