src/entities/Enemy.js
/**
	* Ensure the enemy only changes it rotation around its y-axis by consider the target
	* in a logical xz-plane which has the same height as the current position.
	* In this way, the enemy never "tilts" its body. Necessary for levels with different heights.
	*
	* @param {Vector3} target - The target position.
	* @param {Number} delta - The time delta.
	* @param {Number} tolerance - A tolerance value in radians to tweak the result
	* when a game entity is considered to face a target.
	* @return {Boolean} Whether the entity is faced to the target or not.
	*/
Ensure the enemy only changes it rotation around its y-axis by consider the target
in a logical xz-plane which has the same height as the current position.
In this way, the enemy never "tilts" its body. Necessary for levels with different heights.

@param {Vector3} target - The target position.
@param {Number} delta - The time delta.
@param {Number} tolerance - A tolerance value in radians to tweak the result
when a game entity is considered to face a target.
@return {Boolean} Whether the entity is faced to the target or not.
Ensure the enemy only changes it rotation around its y - axis by consider the target in a logical xz - plane which has the same height as the current position . In this way the enemy never " tilts " its body . Necessary for levels with different heights . @param { Vector3 } target - The target position . @param { Number } delta - The time delta . @param { Number } tolerance - A tolerance value in radians to tweak the result when a game entity is considered to face a target . @return { Boolean } Whether the entity is faced to the target or not .
rotateTo( target, delta, tolerance ) {
		customTarget.copy( target );
		customTarget.y = this.position.y;
		return super.rotateTo( customTarget, delta, tolerance );
	}
rotateTo ( target , delta , tolerance ) { customTarget . copy ( target ) ; customTarget . y = this . position . y ; return super . rotateTo ( customTarget , delta , tolerance ) ; }
Ensure the enemy only changes it rotation around its y-axis by consider the target
 in a logical xz-plane which has the same height as the current position.
Ensure the enemy only changes it rotation around its y - axis by consider the target in a logical xz - plane which has the same height as the current position .