there's position which is simd3 and there 's anchorEntity. I want to get distance between two.
how I did is
var distance = distance(position, ( self.modelentity.position(relativeTo:nil) )
var distance = distance(position, ( self.modelentity.position )
but both failed because it seems calculating distance between world origin anchor not distance between position to self.modelentity.
how can I calculate distance ?