admin管理员组文章数量:1321055
In ARKit I can left the left-eye transform, but strangely this is not supported in visionOS.
In MetalKit I can get the leftView.transform from the provided LayerRenderer.Drawable views:
func renderDonut(drawable : LayerRenderer.Drawable,
renderEncoder : MTLRenderCommandEncoder,
simdDeviceAnchor : simd_float4x4) {
let leftView = drawable.views[0]
let leftViewMatrix = (simdDeviceAnchor * leftView.transform).inverse
let leftProjectionMatrix = drawableputeProjection(viewIndex: 0)
...
}
There does not seem to be anything in the API get this transform in visionOS using RealityKit. I can get the Camera Position in a Reality Composer Pro material shader, but is this the position of the left or right eye depending on which frame is being rendered?
We can get the deviceAnchor and fetch its transform which gives its position and orientation for the sensor which is roughly around the user's forehead. But there is nothing provided in RealityKit to get the position of the left or right relative to this.
This related to a similar question I asked earlier.
本文标签: How to obtain the left eye transform in visionOS using RealityKitStack Overflow
版权声明:本文标题:How to obtain the left eye transform in visionOS using RealityKit? - Stack Overflow 内容由网友自发贡献,该文观点仅代表作者本人, 转载请联系作者并注明出处:http://www.betaflare.com/web/1742092908a2420374.html, 本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌抄袭侵权/违法违规的内容,一经查实,本站将立刻删除。
发表评论