deactivation fixed

This commit is contained in:
Luis Fernando Molina committed 2020-04-29 12:09:03 +02:00
1 parent 2eb284c8c7
commit 90d8b48613
4 files changed
+21 -72

No files matched your search

+1 -1
View File
@@ -211,7 +211,7 @@ function newFrame () {
/* Now we check if the resulting point is whin the current Frame. */
if (isNaN(checkPoint.x) || isNaN(checkPoint.y)) { return false }
if (thisObject.type === 'Circle') {
let distance = Math.sqrt(Math.pow(thisObject.position.x - point.x, 2) + Math.pow(thisObject.position.y - point.y, 2))
let distance = Math.sqrt(Math.pow(thisObject.position.x - checkPoint.x, 2) + Math.pow(thisObject.position.y - checkPoint.y, 2))
if (distance < thisObject.radius) {
return true