WayPointElement
WayPointElement
represents a configurable waypoint within the scene. It allows control over interactions, movement restrictions, and hover behavior.
Example:
const waypoint = new WayPointElement();
scene.add(waypoint);
canBeSpawnPoint: boolean
Whether this waypoint can serve as a spawn point.
Example:
waypoint.canBeSpawnPoint = true;
canBeOccupied: boolean
Determines if this waypoint can be occupied by an entity (e.g., player or NPC).
Example:
waypoint.canBeOccupied = false;
canBeClicked: boolean
Allows the waypoint to be interactable through clicking.
Example:
waypoint.canBeClicked = true;
willDisableMotion: boolean
If true, this waypoint will disable character motion upon arrival.
Example:
waypoint.willDisableMotion = false;
willDisableTeleporting: boolean
If true, teleporting to this waypoint will be disabled.
Example:
waypoint.willDisableTeleporting = true;
snapToNavMesh: boolean
Determines if the waypoint should snap to the nearest nav mesh surface.
Example:
waypoint.snapToNavMesh = true;
willMaintainInitialOrientation: boolean
Whether the object should maintain its initial orientation after use.
Example:
waypoint.willMaintainInitialOrientation = false;
hoverBoxPosition: THREE.Vector3
The 3D position offset of the hover box relative to the waypoint.
Example:
waypoint.hoverBoxPosition = new THREE.Vector3(0, 2, 0);
hoverBoxScale: THREE.Vector3
The scale of the hover box used for UI or interaction feedback.
Example:
waypoint.hoverBoxScale = new THREE.Vector3(1, 1, 1);
sitAnimation: string
Name of the animation played when sitting at this waypoint.
Example:
waypoint.sitAnimation = 'SitRelaxed';