It's because your array of PhotogrammetrySamples is not ordered correctly - make sure they are sorted by their PhotogrammetrySample.id.
Topic:
Spatial Computing
SubTopic:
ARKit
Tags: