Posts

Post not yet marked as solved
0 Replies
195 Views
Hello, I am using ARkit for face tracking with the Truth Depth camera. However, after reading this post https://github.com/Unity-Technologies/arfoundation-samples/issues/288#issuecomment-661634964 and https://stackoverflow.com/questions/57582930/why-does-arfaceanchor-have-negative-z-position I noticed that ARFaceAnchor is actually left-handed instead of right-handed as the documentation described. Currently I have:          func renderer(_ renderer: SCNSceneRenderer, didAdd node: SCNNode, for anchor: ARAnchor) {         guard let faceAnchor = anchor as? ARFaceAnchor else { return }         currentFaceAnchor = faceAnchor         if node.childNodes.isEmpty, let contentNode = selectedContentController.renderer(renderer, nodeFor: faceAnchor) {             node.addChildNode(contentNode)         }         selectedContentController.session = sceneView?.session         selectedContentController.sceneView = sceneView     }          /// - Tag: ARFaceGeometryUpdate     func renderer(_ renderer: SCNSceneRenderer, didUpdate node: SCNNode, for anchor: ARAnchor) {         guard anchor == currentFaceAnchor,             let contentNode = selectedContentController.contentNode,             contentNode.parent == node             else { return }         selectedContentController.session = sceneView?.session         selectedContentController.sceneView = sceneView         selectedContentController.renderer(renderer, didUpdate: contentNode, for: anchor)     } } I am wondering how to correct it using the following suggestion from SO: func faceAnchorPoseToRHS(_ mat: float4x4) -> float4x4 { 		let correctedPos = float4(x: mat.columns.3.x, y: mat.columns.3.y, z: -mat.columns.3.z, w: 1) 		let quat = simd_quatf(mat) 		let newQuat = simd_quatf(angle: -quat.angle, axis: float3(quat.axis.x, quat.axis.y, -quat.axis.z)) 		var newPose = float4x4(newQuat) 		newPose.columns.3 = correctedPos 		return newPose } Sorry I am a bit new to ARkit and wondering how to properly use the suggestion above to correct the coordinate system.
Posted
by sterice.
Last updated
.
Post not yet marked as solved
0 Replies
282 Views
Hello,Has anyone tried this tutorial (https://www.appcoda.com/replaykit/)building the screen and audio capture on the app? I followed the tutorial and successfully built the app. The recording function its running (based on the terminal saying "starting to record) but it had no way to stop or see the result. (Not too sure its the app is crashed or not?)I also added the following in the recording function:DispatchQueue.main.async { self.micToggle.isEnabled = false self.recordButton.backgroundColor = UIColor.red self.statusLabel.text = "Recording..." self.statusLabel.textColor = UIColor.red }Based on the modification but it still not working...Can anyone give me some help?Thanks in advacne!
Posted
by sterice.
Last updated
.