Hi, I have a small question. Is it possible to place the entities from a reality view (Immersive space) at the eye level on Y axis? Is it enough to set the position to (x, 0 , z)?
Accepted Reply
Hello,
The origin of an ImmersiveSpace is at the user's feet when the space is opened. Given that, a y-value of 0 corresponds to the height of the floor. There is no API to get "eye level", but there is API to get the pose (and therefore the height) of the device: https://developer.apple.com/documentation/arkit/worldtrackingprovider/4293525-querydeviceanchor
-
Can you give me an example of usage please?
Replies
Hello,
The origin of an ImmersiveSpace is at the user's feet when the space is opened. Given that, a y-value of 0 corresponds to the height of the floor. There is no API to get "eye level", but there is API to get the pose (and therefore the height) of the device: https://developer.apple.com/documentation/arkit/worldtrackingprovider/4293525-querydeviceanchor
-
Can you give me an example of usage please?
Can you give me an example of usage please?
-
Does this look ok in a RealityView?
let provider = WorldTrackingProvider() var deviceAnchor = provider.queryDeviceAnchor(atTimestamp: CACurrentMediaTime()) var deviceYPos:Float = Float(deviceAnchor?.originFromAnchorTransform[3][2] ?? 0)