diff --git a/Sources/NYT360CameraController.m b/Sources/NYT360CameraController.m index a76920b..9b84127 100644 --- a/Sources/NYT360CameraController.m +++ b/Sources/NYT360CameraController.m @@ -10,6 +10,8 @@ #import "NYT360EulerAngleCalculations.h" #import "NYT360CameraPanGestureRecognizer.h" +static const CGPoint kStartingPosition = { 3.14, 0 }; + static inline CGFloat distance(CGPoint a, CGPoint b) { return sqrt(pow(a.x - b.x, 2) + pow(a.y - b.y, 2)); } @@ -48,7 +50,7 @@ - (instancetype)initWithView:(SCNView *)view motionManager:(id minimalRotationDistanceToReport) { + if (distance(kStartingPosition, self.currentPosition) > minimalRotationDistanceToReport) { [self reportInitialCameraMovementIfNeededViaMethod:NYT360UserInteractionMethodGyroscope]; } }