Hi Guys,
i played today a little bit with the sample "route_00". I reduce the number of bots to one, to see who all work.
But now I have a Problem which I dont understand.
In this case all works great, but...
if(engine.game.isEnabled()) {
myCoin.update();
robot.update((1));
if(robot .needCoin() == 0)
{
robot.createCoin(engine.game.getRandom(min,max));
}
}
if(engine.game.isEnabled()) {
myCoin.update();
robot .update((1));
if(robot .needCoin() == 0)
{
robot.createCoin(pos1);
}
}
void create_scene() {
NavigationSector navigation = add_editor(new NavigationSector(vec3(1024.0f,1024.0f,9.0f)));
navigation.setWorldTransform(translate(Vec3(0.0f,0.0f,5.0f) + offset));
pos1 = engine.game.getRandom(min,max);
robot =new Robot2D(engine.game.getRandom(min,max));
return "PathRoute2D in NavigationSector with obstacles";
}
in this case the robot stands still by his first and last coin, why? I dont understand it, and i tryed several things.