ARKit - Detecting Touches inside UIView diffused on an SCNPlane

Hey guys,


So, I created a UIView and displayed it on a SCNPlane, when an image is detected in AR using ARImageTrackingConfiguration.

Is it possible for me to detect touches of items such as UIButtons inside of that UIView?


Thanks in advance for the help.

Replies

hey, same question.. did you find anything?

The supported types for the contents of an SCNMaterialProperty are listed in the Discussion section here: https://developer.apple.com/documentation/scenekit/scnmaterialproperty/1395372-contents


Notice that UIView is absent from that list, and is therefore not a supported type for the contents of an SCNMaterialProperty. While contents does accept Any type, since UIView isn't a supported type, the behavior of setting a UIView as the contents of an SCNMaterialProperty is not guaranteed, and may behave strangely.