fix grab-point sphere for right hand

This commit is contained in:
Seth Alves 2016-09-06 15:15:46 -07:00
parent 43c98b3f1e
commit 215fd4ddfd

View file

@ -118,7 +118,7 @@ var NEAR_GRABBING_KINEMATIC = true; // force objects to be kinematic when near-g
var CHECK_TOO_FAR_UNEQUIP_TIME = 0.3; // seconds, duration between checks
var GRAB_POINT_SPHERE_OFFSET = { x: 0.1, y: 0.175, z: -0.04 };
var GRAB_POINT_SPHERE_OFFSET = { x: 0.1, y: 0.175, z: 0.04 };
var GRAB_POINT_SPHERE_RADIUS = NEAR_GRAB_RADIUS;
var GRAB_POINT_SPHERE_COLOR = { red: 20, green: 90, blue: 238 };
var GRAB_POINT_SPHERE_ALPHA = 0.85;
@ -747,7 +747,7 @@ function MyController(hand) {
return {
x: GRAB_POINT_SPHERE_OFFSET.x * -1,
y: GRAB_POINT_SPHERE_OFFSET.y,
z: GRAB_POINT_SPHERE_OFFSET.z * -1
z: GRAB_POINT_SPHERE_OFFSET.z
};
};
@ -1481,7 +1481,8 @@ function MyController(hand) {
// before including any ray-picked entities, give a haptic pulse if the grab-point has hit something grabbable
if (grabbableEntities.length > 0) {
if (!this.grabPointIntersectsEntity) {
Controller.triggerHapticPulse(1, 20, this.hand);
// Controller.triggerHapticPulse(1, 20, this.hand);
Controller.triggerHapticPulse(HAPTIC_PULSE_STRENGTH, HAPTIC_PULSE_DURATION, this.hand);
this.grabPointIntersectsEntity = true;
}
} else {