src/entities/Enemy.js
/**
	* Returns true if the enemy can move a step to the given dirction without
	* leaving the level. The new position vector is stored into the given vector.
	*
	* @param {Vector3} direction - The direction vector.
	* @param {Vector3} position - The new position vector.
	* @return {Boolean} Whether the enemy can move a bit to the left or not.
	*/
Returns true if the enemy can move a step to the given dirction without
leaving the level. The new position vector is stored into the given vector.

@param {Vector3} direction - The direction vector.
@param {Vector3} position - The new position vector.
@return {Boolean} Whether the enemy can move a bit to the left or not.
Returns true if the enemy can move a step to the given dirction without leaving the level . The new position vector is stored into the given vector . @param { Vector3 } direction - The direction vector . @param { Vector3 } position - The new position vector . @return { Boolean } Whether the enemy can move a bit to the left or not .
canMoveInDirection( direction, position ) {
		position.copy( direction ).applyRotation( this.rotation ).normalize();
		position.multiplyScalar( CONFIG.BOT.MOVEMENT.DODGE_SIZE ).add( this.position );
		const navMesh = this.world.navMesh;
		const region = navMesh.getRegionForPoint( position, 1 );
		return region !== null;
	}
canMoveInDirection ( direction , position ) { position . copy ( direction ) . applyRotation ( this . rotation ) . normalize ( ) ; position . multiplyScalar ( CONFIG . BOT . MOVEMENT . DODGE_SIZE ) . add ( this . position ) ; const navMesh = this . world . navMesh ; const region = navMesh . getRegionForPoint ( position , 1 ) ; return region !== null ; }
Returns true if the enemy can move a step to the given dirction without
 leaving the level.
Returns true if the enemy can move a step to the given dirction without leaving the level .