Instantiates a FlyCamera. This is a flying camera, designed for 3D movement and rotation in all directions, such as in a 3D Space Shooter or a Flight Simulator.
Define the name of the camera in the scene.
Define the starting position of the camera in the scene.
Define the scene the camera belongs to.
Defines wheter the camera should be marked as active, if no other camera has been defined as active.
Track Roll to maintain the wanted Rolling when looking around.
Sets the input sensibility for a mouse input. Higher values reduce sensitivity.
Enable or disable gravity on the camera.
Mimic a banked turn, Rolling the camera when Yawing. It's recommended to use rollCorrect = 10 for faster banking correction.
Limit in radians for how much Roll banking will add. (Default: 90°)
Value of 0 disables the banked Roll. Value of 1 is equal to the Yaw angle in radians.
Define the current direction the camera is moving to.
Define the current rotation the camera is rotating to
Enable or disable collisions of the camera with the rest of the scene objects.
Set the mask that the camera ignores in collision events.
Define the collision ellipsoid of the camera. This is helpful for simulating a camera body, like a player's body.
Define an offset for the position of the ellipsoid around the camera. This can be helpful if the camera is attached away from the player's body center, such as at its head.
The inputs manager loads all the input sources, such as keyboard and mouse.
Get the keys for camera movement backward.
Set the keys for camera movement down.
Set the keys for camera movement forward.
Set the keys for camera movement left.
Set the keys for camera movement right.
Set the keys for camera movement up.
Define the current target of the camera as an object or a position.
Add constraint to the camera to prevent it to move freely in all directions and around all axis.
Event raised when the camera collides with a mesh in the scene.
Slowly correct the Roll to its original value after a Pitch+Yaw rotation.
Define the current rotation of the camera
Define the current local rotation of the camera as a quaternion to prevent Gimbal lock. This overrides and empties cameraRotation.
Define the current speed of the camera
When set, the up vector of the camera will be updated by the rotation of the camera
Attach a control to the HTML DOM element.
Defines the element that listens to the input events.
Defines whether events caught by the controls should call preventdefault(). https://developer.mozilla.org/en-US/docs/Web/API/Event/preventDefault
Detach a control from the HTML DOM element. The camera will stop reacting to that input.
Defines the element that listens to the input events.
Destroy the camera and release the current resources held by it.
Get the current object class name.
the class name.
Gets the position in front of the camera at a given distance.
The distance from the camera we want the position to be
the position
Return the current target position of the camera. This value is expressed in local space.
the target position
Defines the target the camera should look at.
Defines the new target as a Vector or a mesh
Store current camera state of the camera (fov, position, rotation, etc..)
the camera
Generated using TypeDoc
This is a flying camera, designed for 3D movement and rotation in all directions, such as in a 3D Space Shooter or a Flight Simulator.