collide: Fix pusher if interior and surface point don't lie along normal

Currently, all tests I'm aware of put the surface point above the interior point (ie. along the normal), but there seems to be no good reason for this requirement, especially since a dot product is more efficient than a length().
This commit is contained in:
rdb 2021-01-12 14:51:42 +01:00
parent 84034f06f5
commit 1b7f3e4bbd

View File

@ -140,7 +140,7 @@ handle_entries() {
ShoveData sd; ShoveData sd;
sd._vector = normal; sd._vector = normal;
sd._length = (surface_point - interior_point).length(); sd._length = (surface_point - interior_point).dot(normal);
sd._valid = true; sd._valid = true;
sd._entry = entry; sd._entry = entry;