cmmotionmanager

cameranode rotate as iOS device moving

半腔热情 提交于 2019-11-26 20:18:03
问题 It's 360 degree video player project. I add a cameranode( SCNNode ) to a rootnode, the cameranode was put at the center(0,0,0) of the SCNSphere , It can play video by now. Now I have to use devicemotion. I need to rotate the camera when device moves. Not just rotate a certain angle. (Not just device move, When I'm holding a device, my moving regard as the device moving. because I found if I use deviceMotion.attitude.roll , the cameranode only moves when device moves by itself, not when I