DragForce class

Velocity-proportional drag (air resistance).

Each frame the velocity magnitude is reduced by: v *= 1 - coefficient * dt

A coefficient of 0.1 removes ~10% of velocity per second.

Inheritance

Constructors

DragForce({double coefficient = 0.05})
const

Properties

coefficient double
Drag coefficient in 0, 1 range. Typical values: 0.02–0.15.
final
hashCode int
The hash code for this object.
no setterinherited
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

apply(Particle particle, double dt) → void
Apply this force to particle for a time step of dt seconds.
override
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toString() String
A string representation of this object.
inherited

Operators

operator ==(Object other) bool
The equality operator.
inherited