mardi 16 octobre 2018

SceneKit floor reflections of selected bit mask

I have added to the scene a floor created this way:

let floor = SCNFloor()
floor.firstMaterial!.lightingModel = .constant
floor.firstMaterial!.diffuse.contents = UIColor.clear
floor.firstMaterial!.writesToDepthBuffer = true
floor.firstMaterial!.readsFromDepthBuffer = true
floor.reflectionCategoryBitMask = AugmentedRealityViewSceneKitObjectNode.Features.reflectionsOnTheFloor.rawValue // Equals 4

But still all objects are reflected on the floor, even with categoryBitMask = 1. Why is that? I would like only objects with this bit mask to be included.





Aucun commentaire:

Enregistrer un commentaire