[iOS 11] hitTest:options: serious problem

This is a duplicate post because I have been unable to achieve the first one. When trying to add image links the post is put in moderator queue and cant be edited. Please see the sibling post on Stack Overflow. I'll try to add a link as a reply to this one.


I'm facing a difficult situation using hitTest:options: in SceneKit on iOS 11.

In a maping application I have a terrain node. Using hitTest:options: I was able for long to spot a point on the terrain from a touch on the screen. It still work as expected with released binary on iOS 11, and also on Xcode 9 compiled binary for iOS 10 simulator.

But iOS 11 binary on iOS 11 SDK gives totaly eratic results. Return array from hitTest:options: may contain no result or too many. Moreover, most of the time none of the result is valid.


All point returned are aligned in the correct "ray" from the camera through the touched point on the screen. But they are positioned at random (or what?) along the line. Sometimes one of the hit is on the terrain, but most of the time not.


As it has been reported elsewhere the simulator 3D runtime is broken on XC9, so wa have to test on device. Now this problem is worse since no XC9 binary is working correctly on device.

Replies

Here is a link to SO post with images : https://stackoverflow.com/questions/46352867/ios-11-scenekit-hittestoptions-fails

Filed a bug #34592505

openradar 34592505

I filed a bug. The post with the bug number is under moderation(because of link to openradar ?) and should show up latter.

I made a test today using hitTestWithSegmentFromPoint:toPoint:options: and got false results also.

My bug report received followup. They corrected two issues regarding precision and triangle strips.