ios11 - How to detect what part of the 3D object has been selected(touched by the user) using Xcode ARKit(Scenekit)? -


i have developed poc using arkit - scenekit using https://developer.apple.com/sample-code/wwdc/2017/placingobjects.zip. have implemented feature using user can change colours of 3d object after placing in floor using camera. want allow user select part of model(with highlighting part) touch respective part using camera, detect part has been selected , show colour options user.

right allowing change colour of 0th object alone(0th object of selected xcode .scn file) instead of user selecting particular parts below,

 self.virtualobjectmanager.lastusedobject?.childnodes[0].childnodes[0].geometry?.firstmaterial?.multiply.contents  = uicolor(red: 233/255, green: 136/255, blue: 215/255, alpha: 1) 

how implement this? there way can detect part of model user has touched(for example. if cot bed displayed, want recognise if user touched cot or bed before showing colour options)


Comments

Popular posts from this blog

Is there a better way to structure post methods in Class Based Views -

performance - Why is XCHG reg, reg a 3 micro-op instruction on modern Intel architectures? -

jquery - Responsive Navbar with Sub Navbar -