diff --git a/examples/toybox/pistol/createPistol.js b/examples/toybox/pistol/createPistol.js index 8449a2234a..4c5d333ec3 100644 --- a/examples/toybox/pistol/createPistol.js +++ b/examples/toybox/pistol/createPistol.js @@ -1,7 +1,7 @@ var center = Vec3.sum(MyAvatar.position, Vec3.multiply(1.5, Quat.getFront(Camera.getOrientation()))); var scriptURL = Script.resolvePath('pistol.js'); var modelURL = "https://s3.amazonaws.com/hifi-public/eric/models/gun.fbx"; - +print('MAKING A PISTOLA') var pistol = Entities.addEntity({ type: 'Model', @@ -9,8 +9,8 @@ var pistol = Entities.addEntity({ position: center, dimensions: { x: 0.05, - y: .23, - z: .36 + y: 0.23, + z: 0.36 }, script: scriptURL, color: { @@ -20,9 +20,14 @@ var pistol = Entities.addEntity({ }, shapeType: 'box', dynamic: true, - gravity: {x: 0, y: -5.0, z: 0}, + gravity: { + x: 0, + y: -5.0, + z: 0 + }, restitution: 0, - collisionSoundURL: "https://s3.amazonaws.com/hifi-public/sounds/Guns/Gun_Drop_and_Metalli_1.wav", + damping:0.5, + collisionSoundURL: "http://hifi-content.s3.amazonaws.com/james/pistol/sounds/gundrop.wav", userData: JSON.stringify({ grabbableKey: { spatialKey: { @@ -43,4 +48,4 @@ function cleanup() { Entities.deleteEntity(pistol); } -Script.scriptEnding.connect(cleanup); +Script.scriptEnding.connect(cleanup); \ No newline at end of file diff --git a/examples/toybox/pistol/pistol.js b/examples/toybox/pistol/pistol.js index 6ed3407ea9..c2456d4b7d 100644 --- a/examples/toybox/pistol/pistol.js +++ b/examples/toybox/pistol/pistol.js @@ -1,6 +1,5 @@ // // pistol.js -// examples/toybox/entityScripts // // Created by Eric Levin on11/11/15. // Copyright 2015 High Fidelity, Inc. @@ -16,7 +15,6 @@ Script.include("../../libraries/constants.js"); var _this; - // if the trigger value goes below this while held, the can will stop spraying. if it goes above, it will spray var DISABLE_LASER_THRESHOLD = 0.2; var TRIGGER_CONTROLS = [ Controller.Standard.LT, diff --git a/unpublishedScripts/hiddenEntityReset.js b/unpublishedScripts/hiddenEntityReset.js index 78aab78d61..83626ab0af 100644 --- a/unpublishedScripts/hiddenEntityReset.js +++ b/unpublishedScripts/hiddenEntityReset.js @@ -277,7 +277,9 @@ name: "pistol", modelURL: modelURL, position: position, - collisionSoundURL: "https://s3.amazonaws.com/hifi-public/sounds/Guns/Gun_Drop_and_Metalli_1.wav", + restitution: 0, + damping:0.5, + collisionSoundURL: "http://hifi-content.s3.amazonaws.com/james/pistol/sounds/gundrop.wav", dimensions: { x: 0.05, y: 0.23, diff --git a/unpublishedScripts/masterReset.js b/unpublishedScripts/masterReset.js index b3a9d49ea3..f1975466ec 100644 --- a/unpublishedScripts/masterReset.js +++ b/unpublishedScripts/masterReset.js @@ -280,7 +280,8 @@ MasterReset = function() { }, restitution: 0, dynamic: true, - collisionSoundURL: "https://s3.amazonaws.com/hifi-public/sounds/Guns/Gun_Drop_and_Metalli_1.wav", + damping: 0.5, + collisionSoundURL: "http://hifi-content.s3.amazonaws.com/james/pistol/sounds/gundrop.wav", userData: JSON.stringify({ grabbableKey: { spatialKey: {