diff --git a/avlivebody-mac/Sources/AVLiveBody/AVLiveBodyApp.swift b/avlivebody-mac/Sources/AVLiveBody/AVLiveBodyApp.swift index 285f815..e935525 100644 --- a/avlivebody-mac/Sources/AVLiveBody/AVLiveBodyApp.swift +++ b/avlivebody-mac/Sources/AVLiveBody/AVLiveBodyApp.swift @@ -105,7 +105,9 @@ struct ContentView: View { hands: consumer.hands, face: consumer.face, prevPelvis: &prevPelvis) - controller.updateHandFace(hands: consumer.hands, face: consumer.face) + controller.updateHandFace(hands: consumer.hands, + face: consumer.face, + depth: Float(-(prevPelvis?.z ?? 0))) } private func wire() { diff --git a/avlivebody-mac/Sources/AVLiveBody/SceneController.swift b/avlivebody-mac/Sources/AVLiveBody/SceneController.swift index 39a9de5..0d64f24 100644 --- a/avlivebody-mac/Sources/AVLiveBody/SceneController.swift +++ b/avlivebody-mac/Sources/AVLiveBody/SceneController.swift @@ -95,7 +95,9 @@ final class SceneController { mesh?.update(persons) } - func updateHandFace(hands: HandsPayload?, face: FacePayload?) { + func updateHandFace(hands: HandsPayload?, face: FacePayload?, + depth: Float) { + handFace?.setDepth(depth) handFace?.update(hands: hands, face: face) }