ixfx
    Preparing search index...

    Function angleFromVelocityForce

    • Yields a force function that applies the thing's velocity to its angle. This will mean it points in the direction of travel.

      Parameters

      • interpolateAmt: number = 1

        If provided, the angle will be interpolated toward by this amount. Defaults to 1, no interpolation

      Returns (
          t: ForceAffected,
      ) => Readonly<
          {
              acceleration?: Geometry.Point;
              angle: number;
              angularAcceleration?: number;
              angularVelocity?: number;
              mass?: number;
              position?: Geometry.Point;
              velocity?: Geometry.Point;
          },
      >