optimize raycast

This commit is contained in:
2youyouo2
2017-03-17 10:04:57 +08:00
parent 2cc177c42d
commit 1b173ea6d2
+1 -1
View File
@@ -135,7 +135,7 @@ var PhysicsManager = cc.Class({
},
rayCast: function (p1, p2, type) {
if (p1.sub(p2).magSqr() === 0) {
if (p1.equals(p2)) {
return [];
}