This commit is contained in:
James B. Pollack 2016-06-29 10:54:24 -07:00
parent 1b61a240c1
commit fcb6e7869d
2 changed files with 29 additions and 17 deletions

View file

@ -484,8 +484,9 @@
Entities.editEntity(this.arrow, arrowProperties); Entities.editEntity(this.arrow, arrowProperties);
this.playShootArrowSound(); this.playShootArrowSound();
var whichHand = this.hand === 'left' ? 0 : 1; var backHand = this.hand === 'left' ? 1 : 0;
Controller.triggerShortHapticPulse(whichHand, 2); var haptic = Controller.triggerShortHapticPulse(1, backHand);
print('JBP TRIGGERED HAPTIC ' + haptic +" hand: "+ backHand)
//clear the strings back to only the single straight one //clear the strings back to only the single straight one
this.deleteStrings(); this.deleteStrings();

View file

@ -62,24 +62,35 @@ function makeBow() {
shapeType: 'compound', shapeType: 'compound',
compoundShapeURL: COLLISION_HULL_URL, compoundShapeURL: COLLISION_HULL_URL,
script: SCRIPT_URL, script: SCRIPT_URL,
collidesWith: 'dynamic,kinetmatic,static',
userData: JSON.stringify({ userData: JSON.stringify({
grabbableKey: { grabbableKey: {
invertSolidWhileHeld: true invertSolidWhileHeld: true
}, },
wearable:{joints:{RightHand:[{x:0.03960523009300232, wearable: {
y:0.01979270577430725, joints: {
z:0.03294898942112923}, RightHand: [{
{x:-0.7257906794548035, x: 0.03960523009300232,
y:-0.4611682891845703, y: 0.01979270577430725,
z:0.4436084032058716, z: 0.03294898942112923
w:-0.25251442193984985}], }, {
LeftHand:[{x:0.0055799782276153564, x: -0.7257906794548035,
y:0.04354757443070412, y: -0.4611682891845703,
z:0.05119767785072327}, z: 0.4436084032058716,
{x:-0.14914104342460632, w: -0.25251442193984985
y:0.6448180079460144, }],
z:-0.2888556718826294, LeftHand: [{
w:-0.6917579770088196}]}} x: 0.0055799782276153564,
y: 0.04354757443070412,
z: 0.05119767785072327
}, {
x: -0.14914104342460632,
y: 0.6448180079460144,
z: -0.2888556718826294,
w: -0.6917579770088196
}]
}
}
}) })
}; };
@ -148,4 +159,4 @@ function cleanup() {
Entities.deleteEntity(preNotchString); Entities.deleteEntity(preNotchString);
} }
Script.scriptEnding.connect(cleanup); Script.scriptEnding.connect(cleanup);