diff options
author | PouleyKetchoupp <pouleyketchoup@gmail.com> | 2021-07-01 15:14:30 -0700 |
---|---|---|
committer | PouleyKetchoupp <pouleyketchoup@gmail.com> | 2021-07-01 15:15:42 -0700 |
commit | cf1ddfdb90c33564e6c7b240dc75ab4c04aa99b7 (patch) | |
tree | 7483102495c57cbadb0cae981ce91c601c75eed6 /servers/rendering/shader_warnings.h | |
parent | eefe276a82c5ed080c10ac7c991e0348642621b2 (diff) |
Make move_and_slide collision detection more accurate
More accurate unsafe motion calculation
* Safe and unsafe motion are calculated by dichotomy with a limited
number of steps. It's good for performance, but on long motions that
either collide near the beginning or near the end, the result can be
very imprecise.
* Now a factor 0.25 or 0.75 is used to converge faster when this case
happens, which allows longer motions to get more accurate collision
detection.
* Makes snap collision more precise, and helps with cases where diagonal collision on the border of a platform can lead to the character being stuck.
Additional improvements to move_and_slide:
* Handle slide canceling in move_and_collide with 0 velocity instead of
not applying it.
* Better handling of snap with custom logic to cancel sliding.
* Remove small jittering when using stop on slope, by canceling the
motion completely when the resulting motion is less than margin instead
of always projecting to the up direction (in both body motion and snap).
Co-authored-by: fabriceci <fabricecipolla@gmail.com>
Diffstat (limited to 'servers/rendering/shader_warnings.h')
0 files changed, 0 insertions, 0 deletions