setOrientation method

void setOrientation(
  1. dynamic controls
)

Implementation

void setOrientation( controls ) {
	var quaternion = controls.object.quaternion;

	lookDirection.set( 0, 0, - 1 ).applyQuaternion( quaternion );
	spherical.setFromVector3( lookDirection );

	lat = 90 - MathUtils.radToDeg( spherical.phi );
	lon = MathUtils.radToDeg( spherical.theta );
}