CLASSES
TagsA - Z

FreeCamera

NodeCameraTargetCameraFreeCamera

Description

class FreeCamera extends TargetCamera

Constructor

new FreeCamera(name, position, scene)

Create a new free camera. You can move around the world with mouse and keyboard A tutorial about FreeCamera can be found here : https://doc.babylonjs.com/tutorials/Cameras

Parameters

Name Type Description
name string Name of the camera
position Vector3 Starting position of the camera
scene Scene Scene which contain the camera

Members

ellipsoid : Vector3

The collision ellipsoid used to check collisions with the world

checkCollisions : boolean

True : check collisions ; False : don't check collisions

applyGravity : boolean

True : apply gravity ; False : don't apply gravity

inputs : FreeCameraInputsManager

angularSensibility : number

The angular sensibility of the camera

keysUp : number[]

List of keys to up camera

keysDown : number[]

List of keys to down camera

keysLeft : number[]

List of keys to left camera

keysRight : number[]

List of keys to right camera

onCollide : (collidedMesh: AbstractMesh) => void

The function called when this camera collides with the world

collisionMask : number

Methods

attachControl(element, noPreventDefault) → void

Attach the camera to an element

Parameters

Name Type Description
element HTMLElement The element from where detach the camera
optional noPreventDefault boolean @param noPreventDefault

detachControl(element) → void

Parameters

Name Type Description
element HTMLElement The element from where detach the camera

dispose() → void

getClassName() → string