XR · function

aimCameraAtEye

Point a camera at one eye.

Explained in XR.

function aimCameraAtEye(camera: Camera, eye: EyeView): void
import { aimCameraAtEye } from '@driftengine/xr';

Parameters

ParameterTypeDescription
cameraCamera
eyeEyeView

In depth

A one-line function on purpose: the interesting half is Camera.adoptView, which lives in core because the camera is core's and the reason it cannot derive these matrices is written there. What this adds is the direction of the dependency. @driftengine/xr supplies views to a camera; nothing in core reaches back for a session.