From c6be37f63f03abddbadcb38c1c6539450142db3e Mon Sep 17 00:00:00 2001 From: "James B. Pollack" Date: Fri, 20 Nov 2015 16:10:39 -0800 Subject: [PATCH] lifetime --- examples/toybox/bow/bow.js | 24 +----------------------- 1 file changed, 1 insertion(+), 23 deletions(-) diff --git a/examples/toybox/bow/bow.js b/examples/toybox/bow/bow.js index 3a1c13c531..1947672084 100644 --- a/examples/toybox/bow/bow.js +++ b/examples/toybox/bow/bow.js @@ -461,7 +461,6 @@ }, downOffset)], lineWidth: 5, color: this.stringData.currentColor, - ignoreForCollisions: true }); }, @@ -609,7 +608,7 @@ ignoreForCollisions: false, collisionsWillMove: true, velocity: forwardVec, - // lifetime: 10 + lifetime: 10 }; this.playShootArrowSound(); @@ -625,27 +624,6 @@ this.deleteStrings(); - //set an itnerval to check how far the arrow is from the bow before adding gravity, etc. if we add this too soon, the arrow collides with the bow. hence, this function - - // var physicalArrowInterval = Script.setInterval(function() { - // // print('in physical interval') - // var arrowProps = Entities.getEntityProperties(arrowStore, "position"); - // var bowProps = Entities.getEntityProperties(_this.entityID, "position"); - // var arrowPosition = arrowProps.position; - // var bowPosition = bowProps.position; - - // var length = Vec3.distance(arrowPosition, bowPosition); - // // print('LENGTH:::' + length); - // if (length > 2) { - // print('make arrow physical' + arrowStore) - // Entities.editEntity(arrowStore, { - // ignoreForCollisions: false, - // collisionsWillMove: true - // }); - // Script.clearInterval(physicalArrowInterval); - // } - // }, 5) - }, scaleArrowShotStrength: function(value) {