setMoveInput method

void setMoveInput(
  1. Vector2 input, {
  2. bool isRunning = false,
  3. double? cameraHeadingYaw,
})

Feeds planar movement input vector (-1.0 to 1.0 on X/Y, where +Y is forward) and optional cameraHeadingYaw angle (in radians) so movement is relative to camera view.

Implementation

void setMoveInput(
  vm.Vector2 input, {
  bool isRunning = false,
  double? cameraHeadingYaw,
}) {
  _moveInput = input;
  _isRunning = isRunning;
  _cameraHeadingYaw = cameraHeadingYaw;
}