Class FlyCameraMouseInput
Implements
Constructors
constructor
-
Listen to mouse events to control the camera.
Returns FlyCameraMouseInput
Properties
active Button
Detect if any button is being pressed while mouse is moved. -1 = Mouse locked. 0 = Left button. 1 = Middle Button. 2 = Right Button.
angular Sensibility
Defines the pointer's angular sensibility, to control the camera rotation speed. Higher values reduce its sensitivity.
buttons
Defines the buttons associated with the input to handle camera rotation.
buttons Pitch
Assign buttons for Pitch control.
buttons Roll
Assign buttons for Roll control.
buttons Yaw
Assign buttons for Yaw control.
camera
Defines the camera the input is attached to.
touch Enabled
Defines if touch is enabled. (Default is true.)
Methods
attach Control
-
Attach the mouse control to the HTML DOM element.
Parameters
OptionalnoPreventDefault: booleanDefines whether events caught by the controls should call preventdefault().
Returns void
detach Control
-
Detach the current controls from the specified dom element.
Returns void
get Class Name
-
Gets the class name of the current input.
Returns string
the class name.
get Simple Name
-
Get the friendly name associated with the input class.
Returns string
the input's friendly name.
Listen to mouse events to control the camera.
See
https://doc.babylonjs.com/features/featuresDeepDive/cameras/customizingCameraInputs