mirror of
https://github.com/HifiExperiments/overte.git
synced 2025-04-09 09:02:29 +02:00
lowered restitution to 0 to avoid too many collision sounds playing
This commit is contained in:
parent
b7884f487c
commit
706a67b9a1
3 changed files with 7 additions and 4 deletions
|
@ -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);
|
|
@ -354,7 +354,7 @@
|
|||
y: DIAMETER,
|
||||
z: DIAMETER
|
||||
},
|
||||
restitution: 1.0,
|
||||
restitution: 0.0,
|
||||
linearDamping: 0.00001,
|
||||
gravity: {
|
||||
x: 0,
|
||||
|
|
|
@ -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({
|
||||
|
|
Loading…
Reference in a new issue