Class FreeCameraTouchInput
Implements
Constructors
constructor
-
Manage the touch inputs to control the movement of a free camera.
Parameters
- allowMouse: boolean = false
Defines if mouse events can be treated as touch events
Returns FreeCameraTouchInput
- allowMouse: boolean = false
Properties
allow Mouse
[false] Define if mouse events can be treated as touch events
camera
Defines the camera the input is attached to.
single Finger Rotate
Swap touch actions so that one touch is used for rotation and multiple for movement
touch Angular Sensibility
Defines the touch sensibility for rotation. The lower the faster.
touch Move Sensibility
Defines the touch sensibility for move. The lower the faster.
Methods
attach Control
-
Attach the input controls to a specific dom element to get the input from.
Parameters
OptionalnoPreventDefault: booleanDefines whether event caught by the controls should call preventdefault() (https://developer.mozilla.org/en-US/docs/Web/API/Event/preventDefault)
Returns void
check Inputs
-
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 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 friendly name
Manage the touch inputs to control the movement of a free camera.
See
https://doc.babylonjs.com/features/featuresDeepDive/cameras/customizingCameraInputs