updated offset

This commit is contained in:
2020-03-22 19:34:45 +01:00
parent cb58c0756f
commit ed23e8eb89
2 changed files with 3 additions and 3 deletions

View File

@@ -108,8 +108,8 @@ class DDImporter {
console.log(portal);
let portalCenterPoint = portal.position.substring(8, portal.position.length-2).split(", ").map(a => Number(a))
let portalDirection = portal.direction.substring(8, portal.direction.length-2).split(", ").map(a => Number(a))
let portalPoint1 = [portalCenterPoint[0] + portal.radius*portalDirection[0], portalCenterPoint[1] + portal.radius*portalDirection[1]]
let portalPoint2 = [portalCenterPoint[0] - portal.radius*portalDirection[0], portalCenterPoint[1] - portal.radius*portalDirection[1]]
let portalPoint1 = [portalCenterPoint[0] + portal.radius*portalDirection[0] + offsetX, portalCenterPoint[1] + portal.radius*portalDirection[1] + offsetY]
let portalPoint2 = [portalCenterPoint[0] - portal.radius*portalDirection[0] + offsetX, portalCenterPoint[1] - portal.radius*portalDirection[1] + offsetY]
console.log(portalCenterPoint)
console.log(portalPoint1)
console.log(portalPoint2)