FlyCameraController constructor

FlyCameraController({
  1. Vector3? position,
  2. double yaw = 0.0,
  3. double pitch = 0.0,
  4. double speed = 5.0,
  5. double boostMultiplier = 4.0,
  6. double lookSensitivity = 0.005,
  7. double movementSmoothing = 0.0,
  8. bool moveVertical = true,
  9. double pitchLimit = _defaultPitchLimit,
  10. double smoothing = 0.0,
})

Creates a fly controller starting at position with the given yaw and pitch (radians).

Implementation

FlyCameraController({
  Vector3? position,
  double yaw = 0.0,
  double pitch = 0.0,
  this.speed = 5.0,
  this.boostMultiplier = 4.0,
  this.lookSensitivity = 0.005,
  this.movementSmoothing = 0.0,
  this.moveVertical = true,
  this.pitchLimit = _defaultPitchLimit,
  super.smoothing = 0.0,
}) : _position = (position ?? Vector3(0.0, 2.0, 5.0)).clone(),
     _yaw = yaw,
     _yawGoal = yaw,
     _pitch = pitch.clamp(-_defaultPitchLimit, _defaultPitchLimit),
     _pitchGoal = pitch.clamp(-_defaultPitchLimit, _defaultPitchLimit);