cf1ddfdb90
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> |
||
---|---|---|
.. | ||
area_2d_sw.cpp | ||
area_2d_sw.h | ||
area_pair_2d_sw.cpp | ||
area_pair_2d_sw.h | ||
body_2d_sw.cpp | ||
body_2d_sw.h | ||
body_pair_2d_sw.cpp | ||
body_pair_2d_sw.h | ||
broad_phase_2d_bvh.cpp | ||
broad_phase_2d_bvh.h | ||
broad_phase_2d_sw.cpp | ||
broad_phase_2d_sw.h | ||
collision_object_2d_sw.cpp | ||
collision_object_2d_sw.h | ||
collision_solver_2d_sat.cpp | ||
collision_solver_2d_sat.h | ||
collision_solver_2d_sw.cpp | ||
collision_solver_2d_sw.h | ||
constraint_2d_sw.h | ||
joints_2d_sw.cpp | ||
joints_2d_sw.h | ||
physics_server_2d_sw.cpp | ||
physics_server_2d_sw.h | ||
physics_server_2d_wrap_mt.cpp | ||
physics_server_2d_wrap_mt.h | ||
SCsub | ||
shape_2d_sw.cpp | ||
shape_2d_sw.h | ||
space_2d_sw.cpp | ||
space_2d_sw.h | ||
step_2d_sw.cpp | ||
step_2d_sw.h |