d-ronnqvist / SCNBook-code

The sample code for the different chapters in "3D Graphics with Scene Kit" (which I call "SCNBook" as a joke)

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

SCNNode.light versus SCNNode child nodes

bhagenbuch opened this issue · comments

In the first example attaching SCNLight to a new SCNNode (lightNode) and adding the node as a child of the camera node had no effect. (The scene wasn't lit.) Attaching the SCNLight directly to the camera node (using its light property) worked fine. I don't understand the difference. Some clarification might help newbies like me. [Xcode 9, Swift 4]

Sorry. Both approaches seem to work.