Function: poseInFrontOfCamera()
poseInFrontOfCamera(
camera,distance,position,quaternion):object
Defined in: src/generative/GenerativeObjectUtils.ts:47
Computes a world-space pose distance meters in front of the camera,
oriented so its front face (+Z) points back toward the user. Copy the result
straight onto a direct child of the scene; for an object under a transformed
parent, convert it into the parent's space first.
Parameters
camera
The user's camera.
distance
number
Distance in front of the camera, in meters.
position
Vector3 = ...
Optional output world position.
quaternion
Quaternion = ...
Optional output world orientation.
Returns
object
The world position and orientation.
position
position:
Vector3
quaternion
quaternion:
Quaternion