Skip to content

Commit

Permalink
Merge pull request #14827 from PolygonalSun/target-node-construct
Browse files Browse the repository at this point in the history
TargetCamera: Add Node Constructor code for TargetCamera
  • Loading branch information
RaananW committed Mar 4, 2024
2 parents ea9a8ab + fa44012 commit f717362
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions packages/dev/core/src/Cameras/targetCamera.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,12 @@ import { Quaternion, Matrix, Vector3, Vector2, TmpVectors } from "../Maths/math.
import { Epsilon } from "../Maths/math.constants";
import { Axis } from "../Maths/math.axis";
import type { AbstractMesh } from "../Meshes/abstractMesh";
import { Node } from "../node";

Node.AddNodeConstructor("TargetCamera", (name, scene) => {
return () => new TargetCamera(name, Vector3.Zero(), scene);
});

/**
* A target camera takes a mesh or position as a target and continues to look at it while it moves.
* This is the base of the follow, arc rotate cameras and Free camera
Expand Down

0 comments on commit f717362

Please sign in to comment.