How to rotate it less than 360 °? Since your title says “endlessly”, it should work very well, and repeating the animation over and over will be 360 ° or more.
Alternatively, you can check out the default Apple project SceneKit, which works great for me:
[cameraNode runAction:[SCNAction repeatActionForever:[SCNAction rotateByX:0 y:.5 z:0 duration:1]]]
Or, for OSX:
CABasicAnimation *animation = [CABasicAnimation animationWithKeyPath:@"rotation"];
animation.toValue = [NSValue valueWithSCNVector4:SCNVector4Make(0, 0, 1, M_PI*2)];
animation.duration = 15;
animation.repeatCount = MAXFLOAT;
[YOURNODE addAnimation:animation forKey:nil];
source
share