Camera
Properties
orientation(dynamic) — A vector pointed in the direction of the cameraposition(BGE.Math.Vector)motionChecker(MotionChecker)frameSize(BGE.Math.Vector)projectionVersion(integer) — Bumped whenever something about the camera's projection - as opposed to itszoom(float)drawDistanceScale(float) — Multiplier on a 3D camera's maxDrawDistance, set from the renderer's qualitydrawDistanceOverride(float) — Absolute draw distance from the renderer's quality settings; 0 or less meansworldToCamera(Array.<Array.<float>>)name(string)
Constructor
new Camera(): CameraInstance Methods
setFrameSize(width: integer, height: integer): void
Parameters
width(integer)height(integer)
Returns
void
bumpProjectionVersion(): void
Force a projection change to be reported this frame. Public so a future setter can declare a change explicitly rather than relying on the dirty check to spot it.
Returns
void
checkProjectionChange(): void
Returns
void
projectionChangedThisFrame(): boolean
Returns
boolean
onProjectionChange(): void
Returns
void
setTarget(targetPos: BGE.Math.Vector): void
Points the camera at the target position Override in subclasses to implement different camera behaviors
Parameters
targetPos(BGE.Math.Vector)
Returns
void
useDefaultCameraTarget(): void
Returns
void
rotate(
targetPos: BGE.Math.Vector,
rotation: BGE.Math.Vector,
): void
Rotate the camera by the given rotation Override in subclasses to implement different camera behaviors
Parameters
targetPos(BGE.Math.Vector)rotation(BGE.Math.Vector)
Returns
void
checkMovement(): void
Returns
void
onCameraMovement(): void
Returns
void
movedLastFrame(): boolean
Returns
boolean
distanceFromCameraFront(point: BGE.Math.Vector): float
Parameters
point(BGE.Math.Vector)
Returns
float
isInView(point: BGE.Math.Vector): boolean
Parameters
point(BGE.Math.Vector)
Returns
boolean
isAnyInView(points: Array.<BGE.Math.Vector>): boolean
Checks whether any part of a shape, given by its world-space corner/bounding points, could be visible. The default is true when at least one point is in view.
Parameters
points(Array.<BGE.Math.Vector>)
Returns
boolean
computeWorldToCameraMatrix(): void
Returns
void
getDrawMode(): BGE.SceneObjectDrawMode
Returns
worldPointToCanvasPoint(
pWorld: BGE.Math.Vector,
): BGE.Math.Vector
Parameters
pWorld(BGE.Math.Vector)
Returns
BGE.Math.Vector
getUpVector(): BGE.Math.Vector
A normalized vector pointing up in the camera's own view. Together with getRightVector() this spans the plane the camera is looking at, which is what a camera-facing billboard is built in. A camera that can't rotate just uses world up.
Returns
BGE.Math.Vector
getRightVector(): BGE.Math.Vector
A normalized vector pointing right in the camera's own view - see getUpVector().
Returns
BGE.Math.Vector