Closed kpal81xd closed 3 weeks ago
N.B. This script is currently in beta and not finalized
import { MultiCamera } from 'playcanvas/scripts/camera/multi-camera.js'; // ... const camera = new Entity('camera'); camera.addComponent('script'); const script = camera.script.create(MultiCamera); // optional: set scene size script.sceneSize = 100 // focus const point = new Vec3(0, 0, 0); script.focus(point); // or const start = new Vec3(0, 20, 20); script.focus(point, start); // zoom script.resetZoom(start.distance(point));
N.B. This script is currently in beta and not finalized
Usage