From c545f53c75041280d40bd7a1f1e7007c2c7e1a29 Mon Sep 17 00:00:00 2001 From: "James B. Pollack" Date: Tue, 7 Jun 2016 14:43:23 -0700 Subject: [PATCH] target script attached in reset spawner --- unpublishedScripts/DomainContent/Home/pingPongGun/target.js | 6 ++---- unpublishedScripts/DomainContent/Home/reset.js | 3 ++- 2 files changed, 4 insertions(+), 5 deletions(-) diff --git a/unpublishedScripts/DomainContent/Home/pingPongGun/target.js b/unpublishedScripts/DomainContent/Home/pingPongGun/target.js index 4898973f97..1a8ea6a25b 100644 --- a/unpublishedScripts/DomainContent/Home/pingPongGun/target.js +++ b/unpublishedScripts/DomainContent/Home/pingPongGun/target.js @@ -32,8 +32,7 @@ _this.collisionWithEntity = function(myID, otherID, collisionInfo) { //we dont actually use any of the parameters above, since we don't really care what we collided with, or the details of the collision. - print('JBP TARGET COLLISION') - //5 seconds after a collision, upright the target. protect from multiple collisions in a short timespan with the 'shouldUntip' variable + //5 seconds after a collision, upright the target. protect from multiple collisions in a short timespan with the 'shouldUntip' variable if (_this.shouldUntip) { //in Hifi, preface setTimeout with Script.setTimeout Script.setTimeout(function() { @@ -47,11 +46,10 @@ } _this.untip = function() { - print('JBP SHOULD UNTIP') var props = Entities.getEntityProperties(this.entityID); var rotation = Quat.safeEulerAngles(props.rotation) if (rotation.x > 3 || rotation.x < -3 || rotation.z > 3 || rotation.z < -3) { - print('too much pitch or roll, fix it'); + print('home target - too much pitch or roll, fix it'); //we zero out the velocity and angular velocity Entities.editEntity(_this.entityID, { diff --git a/unpublishedScripts/DomainContent/Home/reset.js b/unpublishedScripts/DomainContent/Home/reset.js index 7e69e1782b..cd1dcea76e 100644 --- a/unpublishedScripts/DomainContent/Home/reset.js +++ b/unpublishedScripts/DomainContent/Home/reset.js @@ -563,7 +563,8 @@ reset: true } }), - density:100, + script: 'atp:/pingPongGun/target.js', + density: 100, dynamic: true } var target = Entities.addEntity(targetProperties);