-
Notifications
You must be signed in to change notification settings - Fork 5
Open
Description
Hi,
When I try to change the material of a plane by a long click on it, I get the following error:
Could not cast value of type 'SCNNode' (0x1b4e36850) to 'arkit_by_example.Plane'
It happens on the following code:
(parentNode as! Plane).changeMaterial()
It is due to the fact that the parentNode is not of type Plane but of type SCNNode.
It is not a proper solution to check if the parentNode is of type Plane because it means that in many cases a long click on a plane will not fire a change of its material (bad user experience). The problem is that it seems that the hitTest is not reliable.
Any solution ?
Thanks !
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels