ixfx
    Preparing search index...

    Function angleFromAccelerationForce

    • Yields a force function that applies the thing's acceleration.x to its angular acceleration.

      Parameters

      • scaling: number = 20

        Use this to scale the accel.x value. Defaults to 20 (ie accel.x*20). Adjust if rotation is too much or too little

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