From 0527fcde640eee2e50910526e0e7361a0d144916 Mon Sep 17 00:00:00 2001 From: Florrie Date: Mon, 18 Jun 2018 17:20:59 -0300 Subject: [PATCH] Fix new sprites only showing up in the top-right quadrant --- src/sprites/rendered-target.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/sprites/rendered-target.js b/src/sprites/rendered-target.js index 37c1b5615..0cbbceddf 100644 --- a/src/sprites/rendered-target.js +++ b/src/sprites/rendered-target.js @@ -1004,8 +1004,8 @@ class RenderedTarget extends Target { const newTarget = newSprite.createClone(); // Copy all properties. // @todo refactor with clone methods - newTarget.x = Math.random() * 400 / 2; - newTarget.y = Math.random() * 300 / 2; + newTarget.x = (Math.random() - 0.5) * 400 / 2; + newTarget.y = (Math.random() - 0.5) * 300 / 2; newTarget.direction = this.direction; newTarget.draggable = this.draggable; newTarget.visible = this.visible;