[ad_1]
I’m able to tarcke human physique utilizing arkit.
func session(_ session: ARSession, didUpdate anchors: [ARAnchor]) {
for anchor in anchors {
guard let bodyAnchor = anchor as? ARBodyAnchor else { proceed }
// Replace the place of the character anchor's place.
let bodyPosition = simd_make_float3(bodyAnchor.rework.columns.3)
characterAnchor.place = bodyPosition + characterOffset
// Additionally copy over the rotation of the physique anchor, as a result of the skeleton's pose
// on the earth is relative to the physique anchor's rotation.
characterAnchor.orientation = Remodel(matrix: bodyAnchor.rework).rotation
//var character1:BodyTrackedEntity?
//character1 = character
if let character = character, character.mother or father == nil {
// Connect the character to its anchor as quickly as
// 1. the physique anchor was detected and
// 2. the character was loaded.
characterAnchor.addChild(character)
//characterAnchor1.addChild(character1!)
}
}
}
I want to avoid wasting the BodyTracking info and relaod it later when required. Consumer will be capable to replay the human animation.
What are potential methods this may be achieved.
What involves my thoughts is to avoid wasting domestically for every body and physique phase the place and orientation. When person desires to replay it load all of the place and orientation body by body after which modify a 3d mannequin place and orientation to show the animation.
Any thought can be useful
Regards,
Rakesh
[ad_2]
