Open abrahamavnisan opened 8 years ago
I'm away and very busy at work this week. Let me get back to you sometime in the beginning of next week.
Thanks @d-ronnqvist, that would be very much appreciated!!
This might be related to this: http://stackoverflow.com/questions/29805632/using-mpmovieplayercontroller-as-texture-in-scenekit I've personnally not been able to use an AVPlayerLayer for a similar usage
First of all - thank you for this awesome book! I teach objective-c to art students at The School of the Art Institute of Chicago and found your book to be a super helpful tool.
I'm trying to modify the example code on pages 63-64, in which you assign the camera input as a reflective material on the spacecraft, so that I can set the camera preview as a background to an SCNScene (I'm doing this as an iOS app, not a mac app).
I'm having no luck and am not sure what I'm doing wrong.The documentation clearly states that this is possible, and while I am able to get the video preview to work in a UIView, I am unable to get it working in my SCNScene. What am I doing wrong?
My code is below. I also posted the project on bitbucket. Setting the useCaptureView BOOL to YES demonstrates that the video preview code works in a UIView.
Any help would be very much appreciated!