ios - Using AVCaptureDevice as SCNScene background content -
during scenekit: what's new presentation @ wwcd2017 (44:19) stated can use avcapturedevice
background content scnscene
.
snippet presentation:
let capturedevice: avcapturedevice = ... scene.background.contents = capturedevice
however following code
let capturedevice = avcapturedevice.default(.builtinwideanglecamera, for: .video, position: .back)! scene.background.contents = capturedevice
produces error:
[scenekit] error: cannot pixel buffer (cvpixelbufferref)
i tried create , start avcapturesession
, use device, gives same result.
what might issue here?
this appears bug in scenekit.
if works workaround use arscnview
. gives access scenekit apis, , automatically draws video feed scene's background.
Comments
Post a Comment