i made many horizontal map,the position is (0,0,0),then bake the navmesh,
but have one map got bug when using navmeshagent:
Vector3 targetY = startPosAtSky + new Vector3 (0, Y, 0);
if (targetY.y < 0) {
targetY = new Vector3 (targetY.x, 0, targetY.z);
DOWN = false;
navmeshagent.enable=true;
Debug.LogWarning("aengt y: "+ character.transform.position.y);//"aengt y:0.0999999"
character.transform.position = targetY;
}
I think when i set (navmeshagent.enable=true),should get the y of the position is"0",not the"0.0999999",something wrong with it?