lowered restitution to 0 to avoid too many collision sounds playing

This commit is contained in:
ericrius1 2015-11-30 15:10:32 -08:00
parent b7884f487c
commit 706a67b9a1
3 changed files with 7 additions and 4 deletions

View file

@ -1,4 +1,4 @@
var center = Vec3.sum(MyAvatar.position, Vec3.multiply(0.5, Quat.getFront(Camera.getOrientation())));
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";
@ -20,6 +20,8 @@ var pistol = Entities.addEntity({
},
shapeType: 'box',
collisionsWillMove: true,
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",
userData: JSON.stringify({
grabbableKey: {
@ -41,4 +43,4 @@ function cleanup() {
Entities.deleteEntity(pistol);
}
// Script.scriptEnding.connect(cleanup);
Script.scriptEnding.connect(cleanup);

View file

@ -354,7 +354,7 @@
y: DIAMETER,
z: DIAMETER
},
restitution: 1.0,
restitution: 0.0,
linearDamping: 0.00001,
gravity: {
x: 0,

View file

@ -153,7 +153,8 @@ MasterReset = function() {
blue: 20
},
shapeType: 'box',
gravity: {x: 0, y: -3.0, z: 0},
gravity: {x: 0, y: -5.0, z: 0},
restitution: 0,
collisionsWillMove: true,
collisionSoundURL: "https://s3.amazonaws.com/hifi-public/sounds/Guns/Gun_Drop_and_Metalli_1.wav",
userData: JSON.stringify({