fix(avlivebody): track hand face depth to pelvis
CI build oscope-of / build-check (push) Has been cancelled
CI build oscope-of / build-check (push) Has been cancelled
Drive HandFaceSkeleton.setDepth() from the body pelvis z each frame (negated ARKit→RealityKit) so hand/face markers follow body depth instead of rendering at the fixed default plane depth 0.
This commit is contained in:
@@ -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() {
|
||||
|
||||
@@ -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)
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user