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 {
185
185
guard let ent = self . targetEntity,
186
186
ent. scene != nil ,
187
187
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
190
191
}
191
192
return
192
193
}
194
+ if self . pinBody. isHidden {
195
+ // show pin if it is hidden
196
+ self . pinBody. isHidden = false
197
+ }
193
198
let matrixZAxis = arView. cameraTransform. matrix. columns. 2
194
199
let zFacing : SIMD3 < Float > = [ matrixZAxis. x, matrixZAxis. y, matrixZAxis. z]
195
200
let toEntityDirection = ent. position ( relativeTo: nil ) - arView. cameraTransform. translation
You can’t perform that action at this time.
0 commit comments