Negative drag destroys this game

Channel:
Subscribers:
8,200
Published on ● Video Link: https://www.youtube.com/watch?v=XCwDzTBz534



Duration: 2:24
3,209 views
49


If you want my hypothesis, it's this:

"Drag per Unit Speed" (or DpUS for short) is a measure of deceleration per unit speed.
While in water, your velocity will reduce at a rate proportional to its magnitude (the faster you move, the quicker you slow down) scaled by whatever DpUS is set to (the higher the value, the quicker you slow down). Put simply, positive DpUS = negative acceleration.

Therefore if DpUS is negative, acceleration is positive - meaning you speed up in water instead of slowing down. (This explains why you plummet to the lakebed). BUT, as you accelerate and your velocity increases, the acceleration due to DpUS will ALSO increase.

Despite being stationary on the lakebed, I am guessing that you're actually picking up an ASTRONOMICAL amount of downward speed. If that's the case, then perhaps you eventually "move" fast enough to overpower the physics engine and clip through the lakebed. That would explain the first cut to black - you fell below the deathplane. I can only assume you're still falling at an ungodly speed after respawning, because the footage appears to show the player voiding out a second time.

After the second clip, the flashing begins.
This one's easy.
That's floating-point precision issues! You are so far out that there isn't enough precision to draw the geometry accurately and so vertices start clamping to the nearest floating point values.

Except... you're still visibly at the bottom of the lake, not lightyears below the ground...
I've got no clue for that one. But the effect is unmistakably floating-point madness.

But the fun's not over yet.
After the lightshow, the apparent framerate drops FAR below the reported framerate, which itself has interestingly also dipped some.
Why? No idea whatsoever.

Then, finally, the graphical artifacts end after a few seconds.
I think it ends once your velocity hits NaN. With a NaN velocity, you're not TECHNICALLY moving, so the funky physics stuff stops.
You can of course still move the player because "externVelocity" is independent from velocity accrued by user input.

Why do you fall infinitely when on land?
Perhaps the NaN external velocity is tripping up the falling logic and the character controller think's you're falling.

PS:
I misremembered the purpose of DpUS in the video. It's ACTUALLY so you don't oscillate infinitely due to buoyancy.
Without drag, buoyancy would lift you high enough to exit the water, and you'd still have some momentum. After you fall back down, the buoyant force would struggle to fight your momentum, letting you sink a bit. Being submerged in the water allows you to build up speed from the buoyant force, and the cycle repeats - resulting in infinite annoying oscillation.
Drag dampens this oscillation, and drag proportional to speed REALLY dampens this oscillation. It just has the convenient side effect of making good feeling water physics.