// // Boat.js // // Created by Rebecca Stankus on 03/07/2018 // Copyright High Fidelity 2018 // // Licensed under the Apache 2.0 License // See accompanying license file or http://apache.org/ // var BOAT = "{4691d6ad-93f5-4456-90b9-95c9f2ef00b2}"; var BOAT_FINAL_POSITION = {x:25.2570,y:-6.8897,z:26.3385}; var BOAT_INITIAL_POSITION = {}; var BOAT_FINAL_ROTATION = {x:0.6377,y:-141.0317,z:-1.1994}; var BOAT_MOVEMENT_INCREMENT = 0.0005; // to turn right, x goes down, y goes down, and z goes up // var BOAT_INITIAL_ROTATION = {}; var currentPosition = JSON.parse(JSON.stringify(BOAT_FINAL_POSITION)); for (var i = 0; i < 500000; i++) { // to move away from dock: x position down, z up currentPosition.x += BOAT_MOVEMENT_INCREMENT; currentPosition.z -= BOAT_MOVEMENT_INCREMENT; Entities.editEntity(BOAT, { position: currentPosition// , // rotation: newRotation }); }