/*
See LICENSE folder for this sample’s licensing information.
Abstract:
The sample app's main view controller.
*/importUIKitimportRealityKitimportARKitimportCombinepublicclassViewController:UIViewController,ARSessionDelegate{
@IBOutletvar arView:ARView!var character:BodyTrackedEntity?let characterOffset:SIMD3<Float>=[-1.0,0,0]// Offset the character by one meter to the leftlet characterAnchor =AnchorEntity()publicoverridefuncviewDidAppear(_ animated:Bool){
super.viewDidAppear(animated)
arView.session.delegate =self// If the iOS device doesn't support body tracking, raise a developer error for// this unhandled case.guardARBodyTrackingConfiguration.isSupported else{
fatalError("This feature is only supported on devices with an A12 chip")}// Run a body tracking configration.let configuration =ARBodyTrackingConfiguration()
arView.session.run</