diff --git a/Sources/NYT360CameraController.m b/Sources/NYT360CameraController.m index a76920b..54decc1 100644 --- a/Sources/NYT360CameraController.m +++ b/Sources/NYT360CameraController.m @@ -10,6 +10,8 @@ #import "NYT360EulerAngleCalculations.h" #import "NYT360CameraPanGestureRecognizer.h" +static const CGPoint startingPosition = { 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(startingPosition, self.currentPosition) > minimalRotationDistanceToReport) { [self reportInitialCameraMovementIfNeededViaMethod:NYT360UserInteractionMethodGyroscope]; } }