mirror of
https://github.com/panda3d/panda3d.git
synced 2025-09-29 00:06:44 -04:00
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:
parent
84034f06f5
commit
1b7f3e4bbd
@ -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;
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user