Function angleFromVelocityForce
- angleFromVelocityForce(interpolateAmt?): ((t: ForceAffected) => Readonly<{
acceleration?: Point;
angle: number;
angularAcceleration?: number;
angularVelocity?: number;
mass?: number;
position?: Point;
velocity?: Point;
}>) Parameters
- interpolateAmt: number = 1
Returns ((t: ForceAffected) => Readonly<{
acceleration?: Point;
angle: number;
angularAcceleration?: number;
angularVelocity?: number;
mass?: number;
position?: Point;
velocity?: Point;
}>)
- (t): Readonly<{
acceleration?: Point;
angle: number;
angularAcceleration?: number;
angularVelocity?: number;
mass?: number;
position?: Point;
velocity?: Point;
}> Returns Readonly<{
acceleration?: Point;
angle: number;
angularAcceleration?: number;
angularVelocity?: number;
mass?: number;
position?: Point;
velocity?: Point;
}>
Yields a force function that applies the thing's velocity to its angle. This will mean it points in the direction of travel.