Skip to content

Commit

Permalink
hot-fix, call to tracking and initializing states after state change
Browse files Browse the repository at this point in the history
maxxfrazer committed Feb 25, 2020
1 parent 20b60a0 commit 609bead
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions Sources/FocusEntity/FocusEntity.swift
Original file line number Diff line number Diff line change
@@ -79,14 +79,14 @@ open class FocusEntity: Entity {
switch state {
case .initializing:
if oldValue != .initializing {
self.delegate?.toInitializingState?()
displayAsBillboard()
self.delegate?.toInitializingState?()
}
case let .tracking(hitTestResult, camera):
let stateChanged = oldValue == .initializing
if stateChanged {
self.delegate?.toTrackingState?()
self.rootEntity.addChild(self)
self.delegate?.toTrackingState?()
}
if let planeAnchor = hitTestResult.anchor as? ARPlaneAnchor {
entityOnPlane(for: hitTestResult, planeAnchor: planeAnchor, camera: camera)

0 comments on commit 609bead

Please sign in to comment.