Пример #1
0
    public void Config(PathFindingGrid grid, float size)
    {
        this.size = size;
        bool isWall = false;

        SetWall(isWall);

        RaycastHit hit;

        if (Physics.Raycast(transform.position + (Vector3.up * 10), -Vector3.up, out hit, Mathf.Infinity))
        {
            LayerMask layer = hit.transform.gameObject.layer;
            weight   = grid.GetWeight(layer);
            Walkable = grid.GetIsWalkable(layer);
            Debug.Log(weight);
        }
    }