createFollowTarget
@zylem/game-lib / core / createFollowTarget
Function: createFollowTarget()
createFollowTarget(
options?):CameraBehavior
Defined in: packages/game-lib/src/lib/camera/behaviors/follow-target.ts:40
A simple follow behavior that moves the camera pose toward a target's position + offset.
This behavior modifies only the position (and lookAt) of the incoming pose, leaving rotation/fov/zoom to the perspective or other behaviors.
Parameters
options?
Returns
Example
camera.addBehavior('follow', createFollowTarget({ targetKey: 'player', offset: new Vector3(0, 3, 8) }));