From c1690bcf322d24bdc200e86201db6f4ef44db20c Mon Sep 17 00:00:00 2001 From: ericrius1 Date: Fri, 6 Nov 2015 15:19:14 -0800 Subject: [PATCH] restoring avatarMover app post S3-loss event --- examples/avatarMover/avatarMoverSpawner.js | 16 ++++++++++++++-- 1 file changed, 14 insertions(+), 2 deletions(-) diff --git a/examples/avatarMover/avatarMoverSpawner.js b/examples/avatarMover/avatarMoverSpawner.js index 0bff3b02c0..526446ecdb 100644 --- a/examples/avatarMover/avatarMoverSpawner.js +++ b/examples/avatarMover/avatarMoverSpawner.js @@ -1,6 +1,18 @@ var modelURL = "https://s3.amazonaws.com/hifi-public/eric/models/arrow.fbx"; +var scriptURL = Script.resolvePath('avatarMover.js'); +var center = Vec3.sum(MyAvatar.position, Vec3.multiply(3, Quat.getFront(Camera.getOrientation()))); var avatarMover = Entities.addEntity({ type: "Model", - modelURL: modelURL -}) \ No newline at end of file + modelURL: modelURL, + position: center, + userData: JSON.stringify({range: 5}), + script: scriptURL +}); + + +function cleanup() { + Entities.deleteEntity(avatarMover); +} + +Script.scriptEnding.connect(cleanup); \ No newline at end of file