BoxColliderElement
BoxColliderElement
represents a box-shaped collider used for collision detection and spatial interaction within the scene. Commonly used to define boundaries, obstacles, or areas that can be walked upon.
Creating a new Box Collider Element:
const boxCollider = new BoxColliderElement();
scene.add(boxCollider);
// Set walkability
boxCollider.walkable = true;
walkable: boolean
Indicates whether this collider surface is walkable. When true, characters or agents can navigate or stand on this collider. When false, it acts as an obstacle or non-navigable area.
Example:
boxCollider.walkable = false;