mirror of
https://github.com/HifiExperiments/overte.git
synced 2025-04-09 09:02:29 +02:00
make pistol collision sound quieter, other adjustments
This commit is contained in:
parent
4ea5c11b73
commit
8d3468265f
4 changed files with 16 additions and 10 deletions
|
@ -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);
|
|
@ -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,
|
||||
|
|
|
@ -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,
|
||||
|
|
|
@ -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: {
|
||||
|
|
Loading…
Reference in a new issue