# Class PivotTargetCamera

This represents a pivot target type of camera. It can be useful for navigating using only mouse and about a pivot position from mouse cursor pick input.

#### Hierarchy

- TargetCamera
  - PivotTargetCamera

##### Index

### Constructors

constructor

### Properties

inputs
onMode
topDownMode
twinfinity

### Methods

_checkInputs
attachControl
detachControl
dispose
getClassName

## Constructors

### constructor

- new PivotTargetCamera(
  name: string,
  position: Vector3,
  scene: Scene,
  ): PivotTargetCamera

  Instantiates a Pivot Target Camera. This represents a Pivot Target type of camera. It can be useful for navigating using only mouse and about a pivot position from mouse cursor pick input.

  #### Parameters

  - name: string

    Define the name of the camera in the scene

  - position: Vector3

    Define the start position of the camera in the scene

  - scene: Scene

    Define the scene the camera belongs to

  #### Returns PivotTargetCamera

  Overrides TargetCamera.constructor

## Properties

### inputs

inputs: TwinfinityTargetCameraInputsManager

Define the input manager associated with the camera.

Overrides TargetCamera.inputs

### `Readonly` onMode

onMode: Observable<PivotTargetCamera> = ...

### topDownMode

topDownMode: boolean = false

Indicates whether camera is in topdown mode or not.

### `Readonly` twinfinity

twinfinity: TwinfinityTargetCameraExtensions

Inherited from TargetCamera.twinfinity

## Methods

### _checkInputs

- _checkInputs(): void

  Override _checkInputs in targetCamera. This function calculates movement, rotation and zoom and apply it to camera position and target.

  #### Returns void

  Overrides TargetCamera._checkInputs

### attachControl

- attachControl(noPreventDefault?: boolean): void

  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

  Overrides TargetCamera.attachControl

- attachControl(ignored: any, noPreventDefault?: boolean): void

  Attach the input controls to a specific dom element to get the input from.

  #### Parameters

  - ignored: any

    defines an ignored parameter kept for backward compatibility. If you want to define the source input element, you can set engine.inputElement before calling camera.attachControl

  - `Optional` noPreventDefault: boolean

    Defines whether event caught by the controls should call preventdefault() (https://developer.mozilla.org/en-US/docs/Web/API/Event/preventDefault) BACK COMPAT SIGNATURE ONLY.

  #### Returns void

  Overrides TargetCamera.attachControl

### detachControl

- detachControl(): void

  Detach the current controls from the specified dom element.

  #### Returns void

  Overrides TargetCamera.detachControl

- detachControl(ignored: any): void

  Detach the current controls from the specified dom element.

  #### Parameters

  - ignored: any

    defines an ignored parameter kept for backward compatibility. If you want to define the source input element, you can set engine.inputElement before calling camera.attachControl

  #### Returns void

  Overrides TargetCamera.detachControl

### dispose

- dispose(): void

  Destroy the camera and release the current resources hold by it.

  #### Returns void

  Overrides TargetCamera.dispose

### getClassName

- getClassName(): string

  Gets the current object class name.

  #### Returns string

  the class name

  Overrides TargetCamera.getClassName