Camera3d
Extends: Camera
Properties
fieldOfViewDegrees(float)frustumNormals(CameraFrustumNormals)frustrumConvergence(BGE.Math.Vector)frustumRays(CameraFrustumRays)name(string)
Constructor
new Camera3d(): Camera3dInstance Methods
setTarget(targetPos: BGE.Math.Vector): void
Parameters
targetPos(BGE.Math.Vector)
Returns
void
rotate(rotation: BGE.Math.Vector): void
Parameters
rotation(BGE.Math.Vector)
Returns
void
onCameraMovement(): void
Returns
void
recomputeFrustum(recomputeNormals: boolean): void
Rebuild the frustum from the camera's current position, orientation and field of view.
Parameters
recomputeNormals(boolean) — whether the frustum plane normals need rebuilding too
Returns
void
distanceFromCameraFront(point: BGE.Math.Vector): float
Parameters
point(BGE.Math.Vector)
Returns
float
distanceFromFrustumSide(
frustumSide: string,
point: BGE.Math.Vector,
): float
Parameters
frustumSide(string)point(BGE.Math.Vector)
Returns
float
isInView(point: BGE.Math.Vector): boolean
Parameters
point(BGE.Math.Vector)
Returns
boolean
computeWorldToCameraMatrix(): void
Returns
void
getDrawMode(): BGE.SceneObjectDrawMode
Returns
toggleWireFrame(): void
Returns
void
worldPointToCanvasPoint(
pWorld: BGE.Math.Vector,
): BGE.Math.Vector
Parameters
pWorld(BGE.Math.Vector)
Returns
BGE.Math.Vector
useDefaultCameraTarget(): void
Returns
void
getHorizonOfPlane_AI(plane: BGE.Math.Plane): dynamic
Returns two screen-space points that define the visible horizon line of a plane. If the horizon does not intersect the camera frame, an empty array is returned.
Parameters
plane(BGE.Math.Plane)
Returns
dynamic— Two points in screen space that define the horizon line of the plane, or an empty array if the plane is not visible.
findHorizonPoint(
screenX: float,
focalLength: float,
nv: BGE.Math.Vector,
): BGE.Math.Vector
Parameters
screenX(float)focalLength(float)nv(BGE.Math.Vector)
Returns
BGE.Math.Vector
getHorizonLine(plane: BGE.Math.Plane): dynamic
Parameters
plane(BGE.Math.Plane)
Returns
dynamic
cameraPointToScreenPoint(
pCamera: BGE.Math.Vector,
): BGE.Math.Vector
Converts from float (-1 to 1) screen space with (0,0) as the center of the screen to pixel coordinates
Parameters
pCamera(BGE.Math.Vector)
Returns
BGE.Math.Vector
getVerticalFOV(): float
Returns
float
getUpVector(): BGE.Math.Vector
Returns a normalized up vector that is perpendicular to the camera orientation. This assumes a world-up preference (+Y), with fallback when forward is parallel to +Y.
Returns
BGE.Math.Vector
getRightVector(): BGE.Math.Vector
Returns
BGE.Math.Vector
projectionChangedThisFrame(): boolean
Returns
boolean
onProjectionChange(): void
Returns
void