mirror of
https://github.com/cocos/cocos4.git
synced 2026-11-21 16:12:40 +08:00
optimize raycast
This commit is contained in:
@@ -135,7 +135,7 @@ var PhysicsManager = cc.Class({
|
||||
},
|
||||
|
||||
rayCast: function (p1, p2, type) {
|
||||
if (p1.sub(p2).magSqr() === 0) {
|
||||
if (p1.equals(p2)) {
|
||||
return [];
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user