Meaning it's calculated based on velocity's magnitude rather than the individual x/y speed. New fields: dragMode and maxSpeedMode
Examples
// old code
// drag.x = drag.y = 800;
// maxVelocity.x = maxVelocity.y = SPEED; // possible to go SPEED * sqrt(2)
// new code
dragMode = XY(800, 800); // behaves identical to old code
maxSpeedMode = LINEAR(SPEED); // impossible to go faster than SPEED
Drag on skid
New field dragApplyMode:
INERTIAL - old behavior where drag is applied when acceleration is 0
ALWAYS - drag is always applied
SKID - drag is applied when inertial or decelerating
TO DO
[ ] Docs
[ ] Unit tests
[ ] Allow different drag modes for X/Y (important for platformers) this might kill this feature if I don't do this right
[x] Remove deprecation warnings (only added them to remove refs in other flixel tools)
Attempt number 2 at #2704:
Allow linear drag and max speed
Meaning it's calculated based on velocity's magnitude rather than the individual x/y speed. New fields:
dragMode
andmaxSpeedMode
Examples
Drag on skid
New field
dragApplyMode
: INERTIAL - old behavior where drag is applied when acceleration is 0 ALWAYS - drag is always applied SKID - drag is applied when inertial or deceleratingTO DO