Class FlyCameraKeyboardInput
Hierarchy
- FlyCameraKeyboardInput
Implements
Index
Constructors
constructor
Returns FlyCameraKeyboardInput
Properties
cameraSearch playground for camera
Defines the camera the input is attached to.
keys BackwardSearch playground for keysBackward
The list of keyboard keys used to control the backward move of the camera.
keys DownSearch playground for keysDown
The list of keyboard keys used to control the backward move of the camera.
keys ForwardSearch playground for keysForward
The list of keyboard keys used to control the forward move of the camera.
keys LeftSearch playground for keysLeft
The list of keyboard keys used to control the left strafe move of the camera.
keys RightSearch playground for keysRight
The list of keyboard keys used to control the right strafe move of the camera.
keys UpSearch playground for keysUp
The list of keyboard keys used to control the forward move of the camera.
Methods
attach ControlSearch playground for attachControl
Attach the input controls to a specific dom element to get the input from.
Parameters
Optional noPreventDefault: boolean
Defines whether event caught by the controls should call preventdefault() (https://developer.mozilla.org/en-US/docs/Web/API/Event/preventDefault)
Returns void
check InputsSearch playground for checkInputs
Update the current camera state depending on the inputs that have been used this frame. This is a dynamically created lambda to avoid the performance penalty of looping for inputs in the render loop.
Returns void
detach ControlSearch playground for detachControl
Detach the current controls from the specified dom element.
Returns void
get Class NameSearch playground for getClassName
Gets the class name of the current input.
Returns string
the class name
get Simple NameSearch playground for getSimpleName
Get the friendly name associated with the input class.
Returns string
the input friendly name
Listen to keyboard events to control the camera.
https://doc.babylonjs.com/how_to/customizing_camera_inputs