More pathing
This commit is contained in:
@@ -3,8 +3,8 @@
|
||||
|
||||
// how mobs find their way, like minecraft's PathFinder with its WalkNodeEvaluator: an A* search over the blocks a
|
||||
// mob's feet can be in. whether it fits in each one comes from its box against the blocks' collision shapes, so
|
||||
// partial blocks need nothing of their own: it steps up onto a slab, and gets past a thin open door at the side of a
|
||||
// doorway. see PATHFINDING.md
|
||||
// partial blocks need nothing of their own: it steps up onto a slab, and goes through a block when its box fits
|
||||
// beside what's in it. see PATHFINDING.md
|
||||
import type { Shape } from "@/common/block_shapes.ts";
|
||||
import { CHUNK_SIZE } from "@/common/constants.ts";
|
||||
import { overlaps_solid } from "@/common/physics.ts";
|
||||
@@ -15,8 +15,8 @@ export interface Point {
|
||||
z: number;
|
||||
}
|
||||
|
||||
// blocks the search goes through as if they weren't there, like doors: a mob that runs into a closed one waits at it
|
||||
// for its behavior to open it, see PathNavigation
|
||||
// blocks the search goes through as if they weren't there, solid or not. a mob pressed against a solid one on its way
|
||||
// waits there, for its behavior to do something about it, see PathNavigation.blocked_by
|
||||
export const MOBS_PATH_THROUGH = "cubi:mobs_path_through";
|
||||
|
||||
// what the search reads, the entity manager is one
|
||||
|
||||
Reference in New Issue
Block a user