File tree Expand file tree Collapse file tree 1 file changed +7
-2
lines changed
Expand file tree Collapse file tree 1 file changed +7
-2
lines changed Original file line number Diff line number Diff line change @@ -185,11 +185,16 @@ public class RKPointPin: UIView {
185185 guard let ent = self . targetEntity,
186186 ent. scene != nil ,
187187 let projPoint = arView. project ( ent. position ( relativeTo: nil ) ) else {
188- if self . pinBody. isHidden {
189- // hide because we do not want to show it now
188+ if !self . pinBody. isHidden {
189+ // hide pin if it is showing
190+ self . pinBody. isHidden = true
190191 }
191192 return
192193 }
194+ if self . pinBody. isHidden {
195+ // show pin if it is hidden
196+ self . pinBody. isHidden = false
197+ }
193198 let matrixZAxis = arView. cameraTransform. matrix. columns. 2
194199 let zFacing : SIMD3 < Float > = [ matrixZAxis. x, matrixZAxis. y, matrixZAxis. z]
195200 let toEntityDirection = ent. position ( relativeTo: nil ) - arView. cameraTransform. translation
You can’t perform that action at this time.
0 commit comments