navmesh error

hi all, im using navmesh in a file and it works fine, the added objects follow the path but in the system control window there is an error, i wanted to use suspend and resume scene and it works too but when i resume the scene all the objects using navmesh are located and oriented in a different way. maybe cause i have this error? how can i fix it? thx
http://i1286.photobucket.com/albums/a616/giobbolo/nav_error_zpsrvfcnfag.jpg

Can you provide a blend file or demo? If you have the setup right there shouldn’t be a problem with suspending/resuming the
scene if you do it with ‘overlay scene.’

Your problem actually appears to be with generating parts of the navmesh itself.

hum the error seems to be due by editing mesh, if i use a default plane for example no errors in the console, but if i divide the plane in edit mode the error pops up
here a .bled demo press space to pause/resume leave the game in pause for e few sec and see what happens

Try pressing “Navmesh Reset Index Values.” That should solve the console problem.

For me, the Suzanne’s seem to be just upright (no problems for this demo), except that once paused, the Suzanne’s locations continue to get updated. You could write further code to stop the Suzannes from executing the steering actuator when the scene is paused.

I don’t know why those Suzannes update as they do though.

EDIT: Your plane is an actual navigation mesh. Don’t subdivide that one, and try regenerating a navmesh from a new plane.

i need to subdivide it cause i need a particular path and i already used clear navmesh data but error still there, i tried to stop suzanne actuators by writing some code but no succes, i think a solution is to use a save load script saving the location.

Try pressing “Navmesh Reset Index Values.” That should solve the console problem.

Hit the button, then hit clear data, then hit the button again (so the clear data lights up) and your problem is gone (at least at my end) in your blend the navmesh got no data.

#edit
also your pause doesn’t work as intended, if you resume after a few seconds the monkeys jumps the distance it traveled.

i already used clear navmesh data

Oh, no, don’t clear navmesh data - you should do “Navmesh reset index values.”
Or you can do what cotax said.

If you want the Suzannes to follow a particular path, you should instead create obstacles, or a path of the plane
you want to create the navmesh for. EDIT: Tinkering with the actual navigation mesh may cause problems (for the console and possible other things).

So, if you wanted a particular path, you should create a plane outlining the path, generate the navmesh, then delete the underlying plane (not the navmesh) if necessary.

Use this to stop the Suzannes:

if own.sensors[1].positive:
    cont.deactivate(cont.actuators[0])
else:
    cont.activate(cont.actuators[0])

EDIT: I forgot to put in the sensor references:
sensors[0] is the ‘always’ sensor to initiate the steering actuator.
sensors[1] is when you press spacebar to pause/resume the scene.
actuators[0] is the steering actuator.

Here, a custom made navmesh, and translated python into bricks. you still need to look into your suspend mode because the monkeys keep moving in pause(after resuming you see it)
navmesh.blend (580 KB)

#edit


if own.sensors[1].positive:    cont.deactivate(cont.actuators[0])
else:     cont.activate(cont.actuators[0])

its also easier to call sensors by name like:


def something(cont):
    
    own = cont.owner
    scene = own.scene
    
    sensor_1 = cont.sensors['name_of_the_sensor']

cotax in your .bled suzanne still jump forward after resuming scene and i already tried to deactivate suzanne actuators but it was a fail

Here: navmesh2.blend (532 KB)

Try combining this with cotax’s navmesh solution.

hum so easy lol, when i tried it i used a message to suzanne from the suspend/resume script using getSceneList() to be sure to send the message to the right scene but something went wrong.
thx all

Glad it worked out!

hum so easy lol, when i tried it i used a message to suzanne from the suspend/resume script using getSceneList() to be sure to send the message to the right scene but something went wrong.

A message is always send to every scene, its just a matter of catching the message with right object.

#edit
forgot to add: a suspended scene won’t receive any data, so in order for your message to get to Suzanne you need to deactivate it/Suzanne before you suspend the scene, and activate it after you have resumed the scene.