virtualx-engine/servers/physics_2d
PouleyKetchoupp cf1ddfdb90 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>
2021-07-01 15:15:42 -07:00
..
area_2d_sw.cpp Merge pull request #44695 from madmiraal/fix-44632 2021-03-26 16:34:02 +01:00
area_2d_sw.h Update copyright statements to 2021 2021-01-01 20:19:21 +01:00
area_pair_2d_sw.cpp Fix and clean disabled shapes handling in godot physics servers 2021-06-22 16:51:47 -07:00
area_pair_2d_sw.h Godot Physics collisions and solver processed on threads 2021-04-26 18:26:00 -07:00
body_2d_sw.cpp More explanatory names for RigidBody modes 2021-06-04 11:40:36 -07:00
body_2d_sw.h Unexpose _direct_state_changed in PhysicsBody 2021-04-22 23:20:58 -05:00
body_pair_2d_sw.cpp Fix and clean disabled shapes handling in godot physics servers 2021-06-22 16:51:47 -07:00
body_pair_2d_sw.h Godot Physics collisions and solver processed on threads 2021-04-26 18:26:00 -07:00
broad_phase_2d_bvh.cpp Dynamic BVH broadphase in 2D & 3D Godot Physics 2021-05-10 16:28:55 -07:00
broad_phase_2d_bvh.h Dynamic BVH broadphase in 2D & 3D Godot Physics 2021-05-10 16:28:55 -07:00
broad_phase_2d_sw.cpp Update copyright statements to 2021 2021-01-01 20:19:21 +01:00
broad_phase_2d_sw.h Dynamic BVH broadphase in 2D & 3D Godot Physics 2021-05-10 16:28:55 -07:00
collision_object_2d_sw.cpp Fix and clean disabled shapes handling in godot physics servers 2021-06-22 16:51:47 -07:00
collision_object_2d_sw.h Fix and clean disabled shapes handling in godot physics servers 2021-06-22 16:51:47 -07:00
collision_solver_2d_sat.cpp Update copyright statements to 2021 2021-01-01 20:19:21 +01:00
collision_solver_2d_sat.h Update copyright statements to 2021 2021-01-01 20:19:21 +01:00
collision_solver_2d_sw.cpp Update copyright statements to 2021 2021-01-01 20:19:21 +01:00
collision_solver_2d_sw.h Update copyright statements to 2021 2021-01-01 20:19:21 +01:00
constraint_2d_sw.h Godot Physics collisions and solver processed on threads 2021-04-26 18:26:00 -07:00
joints_2d_sw.cpp Rename Vector2 clamped to limit_length and add limit_length to Vector3 2021-06-03 12:04:57 -04:00
joints_2d_sw.h Godot Physics collisions and solver processed on threads 2021-04-26 18:26:00 -07:00
physics_server_2d_sw.cpp Fix and clean disabled shapes handling in godot physics servers 2021-06-22 16:51:47 -07:00
physics_server_2d_sw.h Safe margin cleanup 2021-06-04 11:40:36 -07:00
physics_server_2d_wrap_mt.cpp Refactor CommandQueueMT 2021-06-09 13:10:49 -03:00
physics_server_2d_wrap_mt.h Enable setting of collision iterations in PhysicsServer2D 2021-05-19 10:54:10 -04:00
SCsub SCons: Format buildsystem files with psf/black 2020-03-30 09:05:53 +02:00
shape_2d_sw.cpp Merge pull request #47678 from madmiraal/fix-47436.1 2021-04-06 22:35:49 +02:00
shape_2d_sw.h Update copyright statements to 2021 2021-01-01 20:19:21 +01:00
space_2d_sw.cpp Make move_and_slide collision detection more accurate 2021-07-01 15:15:42 -07:00
space_2d_sw.h Update copyright statements to 2021 2021-01-01 20:19:21 +01:00
step_2d_sw.cpp Godot Physics collisions and solver processed on threads 2021-04-26 18:26:00 -07:00
step_2d_sw.h Godot Physics collisions and solver processed on threads 2021-04-26 18:26:00 -07:00