Hello,
Thank you for the outstanding work on this asset, its much better than the glitchy unity nav mesh.
I have 2 issues actually:
(blue blocks are blueprint blocks which are going to be turned into normal wood blocks, they do have collider but do not have the:
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using Pathfinding;
public class UpdateNavObj : MonoBehaviour {
Collider collider;
// Use this for initialization
void Start () {
collider = GetComponent<BoxCollider>();
Bounds b = collider.bounds;
Pathfinding.GraphUpdateObject guo = new Pathfinding.GraphUpdateObject(b);
//guo.setWalkability = true;
AstarPath.active.UpdateGraphs (guo);
}
code that makes the block walkable when built, meaning the code above is attached when the block turns brown)
The issues:
- The grid extends itself onto the other blocks which should not be but will be updated to have a grid when built.
When one block is built, it extends its grid to the other neighboring blocks.
- Which leads to the second problem - the character walks near or on top of the block (to go near another block, and when the character builds the block below it, the grid disappears
You can see dark blue area (the grid) is not connected from the side of the character from the terrain toward the upper part of the blocks where the character is standing.
Because of this it actually creates the green grid above the head of the character instead of the block.
I already set the “end reached destination” to 2f but until the grid expands to non built blocks, issue will persist.
The other solution would be to ignore the player while the grid is built there?