History

Merge branch 'master' into vr-edit-a

David Rowe committed 9 years ago

Commit c56fda82 parents e788f69 a889ca180 files · +1247 −724Browse files

Showing the changes to scripts/system/controllers/controllerModules (14 of 80 files). Show all

Unified · Split

14 files
  1. scripts/system/controllers/controllerModules/disableOtherModule.js +9 −10
  2. scripts/system/controllers/controllerModules/equipEntity.js +2 −5
  3. scripts/system/controllers/controllerModules/farActionGrabEntity.js +19 −11
  4. scripts/system/controllers/controllerModules/farTrigger.js +4 −8
  5. scripts/system/controllers/controllerModules/inEditMode.js +7 −8
  6. scripts/system/controllers/controllerModules/nearActionGrabEntity.js +9 −4
  7. scripts/system/controllers/controllerModules/nearParentGrabEntity.js +10 −8
  8. scripts/system/controllers/controllerModules/nearParentGrabOverlay.js +17 −6
  9. scripts/system/controllers/controllerModules/nearTrigger.js +5 −5
  10. scripts/system/controllers/controllerModules/overlayLaserInput.js +6 −8
  11. scripts/system/controllers/controllerModules/scaleAvatar.js +5 −5
  12. scripts/system/controllers/controllerModules/tabletStylusInput.js +25 −17
  13. scripts/system/controllers/controllerModules/teleport.js +45 −17
  14. scripts/system/controllers/controllerModules/webEntityLaserInput.js +4 −7
scripts/system/controllers/controllerModules/disableOtherModule.js+9−10
@@ -1,15 +1,13 @@
11 "use strict";
22
3−// nearTrigger.js
3+// disableOtherModule.js
44 //
55 // Distributed under the Apache License, Version 2.0.
66 // See the accompanying file LICENSE or http://www.apache.org/licenses/LICENSE-2.0.html
77
88
9−/* global Script, Entities, MyAvatar, Controller, RIGHT_HAND, LEFT_HAND,
10− enableDispatcherModule, disableDispatcherModule, getGrabbableData, Vec3,
11− TRIGGER_OFF_VALUE, makeDispatcherModuleParameters, makeRunningValues, NEAR_GRAB_RADIUS,
12− getEnabledModuleByName
9+/* global Script, MyAvatar, RIGHT_HAND, LEFT_HAND, enableDispatcherModule, disableDispatcherModule,
10+ makeDispatcherModuleParameters, makeRunningValues, getEnabledModuleByName, Messages
1311 */
1412
1513 Script.include("/~/system/libraries/controllerDispatcherUtils.js");
@@ -20,7 +18,9 @@ Script.include("/~/system/libraries/controllerDispatcherUtils.js"); · 4 unmodified lines
2018 this.disableModules = false;
2119 this.parameters = makeDispatcherModuleParameters(
2220 90,
23− this.hand === RIGHT_HAND ? ["rightHand", "rightHandEquip", "rightHandTrigger"] : ["leftHand", "leftHandEquip", "leftHandTrigger"],
21+ this.hand === RIGHT_HAND ?
22+ ["rightHand", "rightHandEquip", "rightHandTrigger"] :
23+ ["leftHand", "leftHandEquip", "leftHandTrigger"],
2424 [],
2525 100);
2626
@@ -37,11 +37,11 @@ Script.include("/~/system/libraries/controllerDispatcherUtils.js"); · 10 unmodified lines
3737
3838 if (teleportModule) {
3939 var ready = teleportModule.isReady(controllerData);
40− if (ready) {
40+ if (ready.active) {
4141 return makeRunningValues(false, [], []);
4242 }
4343 }
44− if (!this.disablemodules) {
44+ if (!this.disableModules) {
4545 return makeRunningValues(false, [], []);
4646 }
4747 return makeRunningValues(true, [], []);
@@ -61,7 +61,6 @@ Script.include("/~/system/libraries/controllerDispatcherUtils.js"); · 13 unmodified lines
6161 }
6262 if (message === 'right') {
6363 rightDisableModules.disableModules = true;
64−
6564 }
6665 if (message === 'both' || message === 'none') {
6766 if (message === 'both') {
@@ -75,7 +74,7 @@ Script.include("/~/system/libraries/controllerDispatcherUtils.js"); · 7 unmodified lines
7574 }
7675 }
7776 };
78−
77+
7978 Messages.subscribe('Hifi-Hand-Disabler');
8079 this.cleanup = function() {
8180 disableDispatcherModule("LeftDisableModules");
scripts/system/controllers/controllerModules/equipEntity.js+2−5
@@ -602,11 +602,8 @@ EquipHotspotBuddy.prototype.update = function(deltaTime, timestamp, controllerDa · 601 unmodified lines
602602 };
603603
604604 this.isTargetIDValid = function() {
605− var entityProperties = Entities.getEntityProperties(this.targetEntityID);
606− for (var propertry in entityProperties) {
607− return true;
608− }
609− return false;
605+ var entityProperties = Entities.getEntityProperties(this.targetEntityID, ["type"]);
606+ return "type" in entityProperties;
610607 };
611608
612609 this.isReady = function (controllerData, deltaTime) {
scripts/system/controllers/controllerModules/farActionGrabEntity.js+19−11
@@ -13,7 +13,7 @@ · 12 unmodified lines
1313 makeDispatcherModuleParameters, MSECS_PER_SEC, HAPTIC_PULSE_STRENGTH, HAPTIC_PULSE_DURATION,
1414 PICK_MAX_DISTANCE, COLORS_GRAB_SEARCHING_HALF_SQUEEZE, COLORS_GRAB_SEARCHING_FULL_SQUEEZE, COLORS_GRAB_DISTANCE_HOLD,
1515 AVATAR_SELF_ID, DEFAULT_SEARCH_SPHERE_DISTANCE, TRIGGER_OFF_VALUE, TRIGGER_ON_VALUE, ZERO_VEC, ensureDynamic,
16− getControllerWorldLocation, projectOntoEntityXYPlane
16+ getControllerWorldLocation, projectOntoEntityXYPlane, ContextOverlay, HMD, Reticle, Overlays
1717
1818 */
1919
@@ -236,10 +236,10 @@ Script.include("/~/system/libraries/controllers.js"); · 216 unmodified lines
236236 this.actionID = null;
237237 }
238238
239− // XXX
240− // if (this.actionID !== null) {
241− // this.callEntityMethodOnGrabbed("startDistanceGrab");
242− // }
239+ if (this.actionID !== null) {
240+ var args = [this.hand === RIGHT_HAND ? "right" : "left", MyAvatar.sessionUUID];
241+ Entities.callEntityMethod(this.grabbedThingID, "startDistanceGrab", args);
242+ }
243243
244244 Controller.triggerHapticPulse(HAPTIC_PULSE_STRENGTH, HAPTIC_PULSE_DURATION, this.hand);
245245 this.previousRoomControllerPosition = roomControllerPosition;
@@ -271,8 +271,8 @@ Script.include("/~/system/libraries/controllers.js"); · 25 unmodified lines
271271 var handMoved = Vec3.multiply(worldHandDelta, radius);
272272 this.currentObjectPosition = Vec3.sum(this.currentObjectPosition, handMoved);
273273
274− // XXX
275− // this.callEntityMethodOnGrabbed("continueDistantGrab");
274+ var args = [this.hand === RIGHT_HAND ? "right" : "left", MyAvatar.sessionUUID];
275+ Entities.callEntityMethod(this.grabbedThingID, "continueDistanceGrab", args);
276276
277277 // Update radialVelocity
278278 var lastVelocity = Vec3.multiply(worldHandDelta, 1.0 / deltaObjectTime);
@@ -335,6 +335,10 @@ Script.include("/~/system/libraries/controllers.js"); · 56 unmodified lines
335335 this.distanceHolding = false;
336336 this.distanceRotating = false;
337337 Entities.deleteAction(this.grabbedThingID, this.actionID);
338+
339+ var args = [this.hand === RIGHT_HAND ? "right" : "left", MyAvatar.sessionUUID];
340+ Entities.callEntityMethod(this.grabbedThingID, "releaseGrab", args);
341+
338342 this.actionID = null;
339343 this.grabbedThingID = null;
340344 };
@@ -343,7 +347,8 @@ Script.include("/~/system/libraries/controllers.js"); · 2 unmodified lines
343347 var intersection = controllerData.rayPicks[this.hand];
344348 var entityProperty = Entities.getEntityProperties(intersection.objectID);
345349 var entityType = entityProperty.type;
346− if ((intersection.type === RayPick.INTERSECTED_ENTITY && entityType === "Web") || intersection.type === RayPick.INTERSECTED_OVERLAY) {
350+ if ((intersection.type === RayPick.INTERSECTED_ENTITY && entityType === "Web") ||
351+ intersection.type === RayPick.INTERSECTED_OVERLAY) {
347352 return true;
348353 }
349354 return false;
@@ -354,7 +359,8 @@ Script.include("/~/system/libraries/controllers.js"); · 4 unmodified lines
354359 this.distanceHolding = false;
355360
356361 var worldControllerRotation = getControllerWorldLocation(this.handToController(), true).orientation;
357− var controllerRotationDelta = Quat.multiply(worldControllerRotation, Quat.inverse(this.previousWorldControllerRotation));
362+ var controllerRotationDelta =
363+ Quat.multiply(worldControllerRotation, Quat.inverse(this.previousWorldControllerRotation));
358364 // Rotate entity by twice the delta rotation.
359365 controllerRotationDelta = Quat.multiply(controllerRotationDelta, controllerRotationDelta);
360366
@@ -426,7 +432,8 @@ Script.include("/~/system/libraries/controllers.js"); · 65 unmodified lines
426432 };
427433
428434 this.run = function (controllerData) {
429− if (controllerData.triggerValues[this.hand] < TRIGGER_OFF_VALUE || this.notPointingAtEntity(controllerData) || this.isPointingAtUI(controllerData)) {
435+ if (controllerData.triggerValues[this.hand] < TRIGGER_OFF_VALUE ||
436+ this.notPointingAtEntity(controllerData) || this.isPointingAtUI(controllerData)) {
430437 this.endNearGrabAction();
431438 this.laserPointerOff();
432439 return makeRunningValues(false, [], []);
@@ -471,6 +478,7 @@ Script.include("/~/system/libraries/controllers.js"); · 38 unmodified lines
471478 for (var j = 0; j < nearGrabReadiness.length; j++) {
472479 if (nearGrabReadiness[j].active) {
473480 this.laserPointerOff();
481+ this.endNearGrabAction();
474482 return makeRunningValues(false, [], []);
475483 }
476484 }
@@ -555,7 +563,7 @@ Script.include("/~/system/libraries/controllers.js"); · 78 unmodified lines
555563 joint: (this.hand === RIGHT_HAND) ? "_CAMERA_RELATIVE_CONTROLLER_RIGHTHAND" : "_CAMERA_RELATIVE_CONTROLLER_LEFTHAND",
556564 filter: RayPick.PICK_ENTITIES | RayPick.PICK_OVERLAYS,
557565 maxDistance: PICK_MAX_DISTANCE,
558− posOffset: getGrabPointSphereOffset(this.handToController()),
566+ posOffset: getGrabPointSphereOffset(this.handToController(), true),
559567 renderStates: renderStates,
560568 faceAvatar: true,
561569 defaultRenderStates: defaultRenderStates
scripts/system/controllers/controllerModules/farTrigger.js+4−8
@@ -6,14 +6,10 @@ · 5 unmodified lines
66 // See the accompanying file LICENSE or http://www.apache.org/licenses/LICENSE-2.0.html
77
88
9−/* global Script, Controller, LaserPointers, RayPick, RIGHT_HAND, LEFT_HAND, Mat4, MyAvatar, Vec3, Camera, Quat,
10− getGrabPointSphereOffset, getEnabledModuleByName, makeRunningValues, Entities, NULL_UUID,
11− enableDispatcherModule, disableDispatcherModule, entityIsDistanceGrabbable,
12− makeDispatcherModuleParameters, MSECS_PER_SEC, HAPTIC_PULSE_STRENGTH, HAPTIC_PULSE_DURATION,
9+/* global Script, Controller, LaserPointers, RayPick, RIGHT_HAND, LEFT_HAND, MyAvatar, getGrabPointSphereOffset,
10+ makeRunningValues, Entities, enableDispatcherModule, disableDispatcherModule, makeDispatcherModuleParameters,
1311 PICK_MAX_DISTANCE, COLORS_GRAB_SEARCHING_HALF_SQUEEZE, COLORS_GRAB_SEARCHING_FULL_SQUEEZE, COLORS_GRAB_DISTANCE_HOLD,
14− AVATAR_SELF_ID, DEFAULT_SEARCH_SPHERE_DISTANCE, TRIGGER_OFF_VALUE, TRIGGER_ON_VALUE, ZERO_VEC, ensureDynamic,
15− getControllerWorldLocation, projectOntoEntityXYPlane, getGrabbableData
16−
12+ AVATAR_SELF_ID, DEFAULT_SEARCH_SPHERE_DISTANCE, getGrabbableData
1713 */
1814
1915 Script.include("/~/system/libraries/controllerDispatcherUtils.js");
@@ -202,7 +198,7 @@ Script.include("/~/system/libraries/controllers.js"); · 182 unmodified lines
202198 joint: (this.hand === RIGHT_HAND) ? "_CAMERA_RELATIVE_CONTROLLER_RIGHTHAND" : "_CAMERA_RELATIVE_CONTROLLER_LEFTHAND",
203199 filter: RayPick.PICK_ENTITIES | RayPick.PICK_OVERLAYS,
204200 maxDistance: PICK_MAX_DISTANCE,
205− posOffset: getGrabPointSphereOffset(this.handToController()),
201+ posOffset: getGrabPointSphereOffset(this.handToController(), true),
206202 renderStates: renderStates,
207203 faceAvatar: true,
208204 defaultRenderStates: defaultRenderStates
scripts/system/controllers/controllerModules/inEditMode.js+7−8
@@ -5,13 +5,12 @@ · 4 unmodified lines
55 // Distributed under the Apache License, Version 2.0.
66 // See the accompanying file LICENSE or http://www.apache.org/licenses/LICENSE-2.0.html
77
8−/* global Script, Entities, MyAvatar, Controller, RIGHT_HAND, LEFT_HAND,
9− NULL_UUID, enableDispatcherModule, disableDispatcherModule, makeRunningValues,
10− Messages, Quat, Vec3, getControllerWorldLocation, makeDispatcherModuleParameters, Overlays, ZERO_VEC,
11− AVATAR_SELF_ID, HMD, INCHES_TO_METERS, DEFAULT_REGISTRATION_POINT, Settings, getGrabPointSphereOffset,
12− COLORS_GRAB_SEARCHING_HALF_SQUEEZE, COLORS_GRAB_SEARCHING_FULL_SQUEEZE, COLORS_GRAB_DISTANCE_HOLD,
13− DEFAULT_SEARCH_SPHERE_DISTANCE, TRIGGER_ON_VALUE, TRIGGER_OFF_VALUE, getEnabledModuleByName, PICK_MAX_DISTANCE,
14− isInEditMode
8+/* jslint bitwise: true */
9+
10+/* global Script, Controller, RIGHT_HAND, LEFT_HAND, enableDispatcherModule, disableDispatcherModule, makeRunningValues,
11+ Messages, makeDispatcherModuleParameters, AVATAR_SELF_ID, HMD, getGrabPointSphereOffset, COLORS_GRAB_SEARCHING_HALF_SQUEEZE,
12+ COLORS_GRAB_SEARCHING_FULL_SQUEEZE, COLORS_GRAB_DISTANCE_HOLD, DEFAULT_SEARCH_SPHERE_DISTANCE, TRIGGER_ON_VALUE,
13+ getEnabledModuleByName, PICK_MAX_DISTANCE, isInEditMode, LaserPointers, RayPick
1514 */
1615
1716 Script.include("/~/system/libraries/controllerDispatcherUtils.js");
@@ -239,7 +238,7 @@ Script.include("/~/system/libraries/utils.js"); · 221 unmodified lines
239238 joint: (this.hand === RIGHT_HAND) ? "_CONTROLLER_RIGHTHAND" : "_CONTROLLER_LEFTHAND",
240239 filter: RayPick.PICK_ENTITIES | RayPick.PICK_OVERLAYS,
241240 maxDistance: PICK_MAX_DISTANCE,
242− posOffset: getGrabPointSphereOffset(this.handToController()),
241+ posOffset: getGrabPointSphereOffset(this.handToController(), true),
243242 renderStates: renderStates,
244243 faceAvatar: true,
245244 defaultRenderStates: defaultRenderStates
scripts/system/controllers/controllerModules/nearActionGrabEntity.js+9−4
@@ -111,6 +111,9 @@ Script.include("/~/system/libraries/cloneEntityUtils.js"); · 110 unmodified lines
111111 grabbedEntity: this.targetEntityID,
112112 joint: this.hand === RIGHT_HAND ? "RightHand" : "LeftHand"
113113 }));
114+
115+ var args = [this.hand === RIGHT_HAND ? "right" : "left", MyAvatar.sessionUUID];
116+ Entities.callEntityMethod(this.targetEntityID, "startNearGrab", args);
114117 };
115118
116119 // this is for when the action is going to time-out
@@ -147,10 +150,10 @@ Script.include("/~/system/libraries/cloneEntityUtils.js"); · 30 unmodified lines
147150 this.getTargetProps = function (controllerData) {
148151 // nearbyEntityProperties is already sorted by distance from controller
149152 var nearbyEntityProperties = controllerData.nearbyEntityProperties[this.hand];
153+ var sensorScaleFactor = MyAvatar.sensorToWorldScale;
150154 for (var i = 0; i < nearbyEntityProperties.length; i++) {
151155 var props = nearbyEntityProperties[i];
152− var handPosition = controllerData.controllerLocations[this.hand].position;
153− if (props.distance > NEAR_GRAB_RADIUS) {
156+ if (props.distance > NEAR_GRAB_RADIUS * sensorScaleFactor) {
154157 break;
155158 }
156159 if (entityIsGrabbable(props) || entityIsCloneable(props)) {
@@ -173,7 +176,8 @@ Script.include("/~/system/libraries/cloneEntityUtils.js"); · 16 unmodified lines
173176 this.targetEntityID = null;
174177
175178 var targetProps = this.getTargetProps(controllerData);
176− if (controllerData.triggerValues[this.hand] < TRIGGER_OFF_VALUE && controllerData.secondaryValues[this.hand] < TRIGGER_OFF_VALUE) {
179+ if (controllerData.triggerValues[this.hand] < TRIGGER_OFF_VALUE &&
180+ controllerData.secondaryValues[this.hand] < TRIGGER_OFF_VALUE) {
177181 return makeRunningValues(false, [], []);
178182 }
179183
@@ -192,7 +196,8 @@ Script.include("/~/system/libraries/cloneEntityUtils.js"); · 12 unmodified lines
192196
193197 this.run = function (controllerData) {
194198 if (this.actionID) {
195− if (controllerData.triggerClicks[this.hand] < TRIGGER_OFF_VALUE && controllerData.secondaryValues[this.hand] < TRIGGER_OFF_VALUE) {
199+ if (controllerData.triggerClicks[this.hand] < TRIGGER_OFF_VALUE &&
200+ controllerData.secondaryValues[this.hand] < TRIGGER_OFF_VALUE) {
196201 this.endNearGrabAction();
197202 this.hapticTargetID = null;
198203 return makeRunningValues(false, [], []);
scripts/system/controllers/controllerModules/nearParentGrabEntity.js+10−8
@@ -6,11 +6,10 @@ · 5 unmodified lines
66 // See the accompanying file LICENSE or http://www.apache.org/licenses/LICENSE-2.0.html
77
88
9−/* global Script, Entities, MyAvatar, Controller, RIGHT_HAND, LEFT_HAND, AVATAR_SELF_ID,
10− getControllerJointIndex, NULL_UUID, enableDispatcherModule, disableDispatcherModule,
11− propsArePhysical, Messages, HAPTIC_PULSE_STRENGTH, HAPTIC_PULSE_DURATION, TRIGGER_OFF_VALUE,
12− makeDispatcherModuleParameters, entityIsGrabbable, makeRunningValues, NEAR_GRAB_RADIUS,
13− findGroupParent, Vec3, cloneEntity, entityIsCloneable, propsAreCloneDynamic, HAPTIC_PULSE_STRENGTH, HAPTIC_PULSE_DURATION, BUMPER_ON_VALUE
9+/* global Script, Entities, MyAvatar, Controller, RIGHT_HAND, LEFT_HAND, AVATAR_SELF_ID, getControllerJointIndex, NULL_UUID,
10+ enableDispatcherModule, disableDispatcherModule, propsArePhysical, Messages, HAPTIC_PULSE_STRENGTH, HAPTIC_PULSE_DURATION,
11+ TRIGGER_OFF_VALUE, makeDispatcherModuleParameters, entityIsGrabbable, makeRunningValues, NEAR_GRAB_RADIUS, findGroupParent,
12+ Vec3, cloneEntity, entityIsCloneable, propsAreCloneDynamic, HAPTIC_PULSE_STRENGTH, HAPTIC_PULSE_DURATION, BUMPER_ON_VALUE
1413 */
1514
1615 Script.include("/~/system/libraries/controllerDispatcherUtils.js");
@@ -147,11 +146,12 @@ Script.include("/~/system/libraries/cloneEntityUtils.js"); · 130 unmodified lines
147146 this.getTargetProps = function (controllerData) {
148147 // nearbyEntityProperties is already sorted by length from controller
149148 var nearbyEntityProperties = controllerData.nearbyEntityProperties[this.hand];
149+ var sensorScaleFactor = MyAvatar.sensorToWorldScale;
150150 for (var i = 0; i < nearbyEntityProperties.length; i++) {
151151 var props = nearbyEntityProperties[i];
152152 var handPosition = controllerData.controllerLocations[this.hand].position;
153153 var distance = Vec3.distance(props.position, handPosition);
154− if (distance > NEAR_GRAB_RADIUS) {
154+ if (distance > NEAR_GRAB_RADIUS * sensorScaleFactor) {
155155 continue;
156156 }
157157 if (entityIsGrabbable(props)) {
@@ -176,7 +176,8 @@ Script.include("/~/system/libraries/cloneEntityUtils.js"); · 18 unmodified lines
176176 this.grabbing = false;
177177
178178 var targetProps = this.getTargetProps(controllerData);
179− if (controllerData.triggerValues[this.hand] < TRIGGER_OFF_VALUE && controllerData.secondaryValues[this.hand] < TRIGGER_OFF_VALUE) {
179+ if (controllerData.triggerValues[this.hand] < TRIGGER_OFF_VALUE &&
180+ controllerData.secondaryValues[this.hand] < TRIGGER_OFF_VALUE) {
180181 return makeRunningValues(false, [], []);
181182 }
182183
@@ -195,7 +196,8 @@ Script.include("/~/system/libraries/cloneEntityUtils.js"); · 12 unmodified lines
195196
196197 this.run = function (controllerData, deltaTime) {
197198 if (this.grabbing) {
198− if (controllerData.triggerClicks[this.hand] < TRIGGER_OFF_VALUE && controllerData.secondaryValues[this.hand] < TRIGGER_OFF_VALUE) {
199+ if (controllerData.triggerClicks[this.hand] < TRIGGER_OFF_VALUE &&
200+ controllerData.secondaryValues[this.hand] < TRIGGER_OFF_VALUE) {
199201 this.endNearParentingGrabEntity();
200202 this.hapticTargetID = null;
201203 return makeRunningValues(false, [], []);
scripts/system/controllers/controllerModules/nearParentGrabOverlay.js+17−6
@@ -6,14 +6,14 @@ · 5 unmodified lines
66 // See the accompanying file LICENSE or http://www.apache.org/licenses/LICENSE-2.0.html
77
88
9−/* global Script, MyAvatar, Controller, RIGHT_HAND, LEFT_HAND, AVATAR_SELF_ID,
10− getControllerJointIndex, NULL_UUID, enableDispatcherModule, disableDispatcherModule,
11− Messages, HAPTIC_PULSE_STRENGTH, HAPTIC_PULSE_DURATION,
12− makeDispatcherModuleParameters, Overlays, makeRunningValues
9+/* global Script, MyAvatar, Controller, RIGHT_HAND, LEFT_HAND, AVATAR_SELF_ID, getControllerJointIndex, NULL_UUID,
10+ enableDispatcherModule, disableDispatcherModule, Messages, HAPTIC_PULSE_STRENGTH, HAPTIC_PULSE_DURATION,
11+ makeDispatcherModuleParameters, Overlays, makeRunningValues, Vec3, resizeTablet, getTabletWidthFromSettings,
12+ NEAR_GRAB_RADIUS
1313 */
1414
1515 Script.include("/~/system/libraries/controllerDispatcherUtils.js");
16−var GRAB_RADIUS = 0.35;
16+Script.include("/~/system/libraries/utils.js");
1717
1818 (function() {
1919
@@ -120,6 +120,11 @@ var GRAB_RADIUS = 0.35; · 100 unmodified lines
120120 }
121121 Overlays.editOverlay(this.grabbedThingID, reparentProps);
122122
123+ // resizeTablet to counter adjust offsets to account for change of scale from sensorToWorldMatrix
124+ if (this.grabbedThingID === HMD.tabletID) {
125+ resizeTablet(getTabletWidthFromSettings(), reparentProps.parentJointIndex);
126+ }
127+
123128 Messages.sendMessage('Hifi-Object-Manipulation', JSON.stringify({
124129 action: 'grab',
125130 grabbedEntity: this.grabbedThingID,
@@ -140,17 +145,23 @@ var GRAB_RADIUS = 0.35; · 14 unmodified lines
140145 parentID: this.previousParentID[this.grabbedThingID],
141146 parentJointIndex: this.previousParentJointIndex[this.grabbedThingID]
142147 });
148+
149+ // resizeTablet to counter adjust offsets to account for change of scale from sensorToWorldMatrix
150+ if (this.grabbedThingID === HMD.tabletID) {
151+ resizeTablet(getTabletWidthFromSettings(), this.previousParentJointIndex[this.grabbedThingID]);
152+ }
143153 }
144154
145155 this.grabbedThingID = null;
146156 };
147157
148158 this.getTargetID = function(overlays, controllerData) {
159+ var sensorScaleFactor = MyAvatar.sensorToWorldScale;
149160 for (var i = 0; i < overlays.length; i++) {
150161 var overlayPosition = Overlays.getProperty(overlays[i], "position");
151162 var handPosition = controllerData.controllerLocations[this.hand].position;
152163 var distance = Vec3.distance(overlayPosition, handPosition);
153− if (distance <= GRAB_RADIUS) {
164+ if (distance <= NEAR_GRAB_RADIUS * sensorScaleFactor) {
154165 return overlays[i];
155166 }
156167 }
scripts/system/controllers/controllerModules/nearTrigger.js+5−5
@@ -6,9 +6,8 @@ · 5 unmodified lines
66 // See the accompanying file LICENSE or http://www.apache.org/licenses/LICENSE-2.0.html
77
88
9−/* global Script, Entities, MyAvatar, Controller, RIGHT_HAND, LEFT_HAND,
10− enableDispatcherModule, disableDispatcherModule, getGrabbableData, Vec3,
11− TRIGGER_OFF_VALUE, makeDispatcherModuleParameters, makeRunningValues, NEAR_GRAB_RADIUS
9+/* global Script, Entities, MyAvatar, RIGHT_HAND, LEFT_HAND, enableDispatcherModule, disableDispatcherModule, getGrabbableData,
10+ Vec3, TRIGGER_OFF_VALUE, makeDispatcherModuleParameters, makeRunningValues, NEAR_GRAB_RADIUS
1211 */
1312
1413 Script.include("/~/system/libraries/controllerDispatcherUtils.js");
@@ -37,11 +36,12 @@ Script.include("/~/system/libraries/controllerDispatcherUtils.js"); · 22 unmodified lines
3736 this.getTargetProps = function (controllerData) {
3837 // nearbyEntityProperties is already sorted by length from controller
3938 var nearbyEntityProperties = controllerData.nearbyEntityProperties[this.hand];
39+ var sensorScaleFactor = MyAvatar.sensorToWorldScale;
4040 for (var i = 0; i < nearbyEntityProperties.length; i++) {
4141 var props = nearbyEntityProperties[i];
4242 var handPosition = controllerData.controllerLocations[this.hand].position;
4343 var distance = Vec3.distance(props.position, handPosition);
44− if (distance > NEAR_GRAB_RADIUS) {
44+ if (distance > NEAR_GRAB_RADIUS * sensorScaleFactor) {
4545 continue;
4646 }
4747 if (entityWantsNearTrigger(props)) {
@@ -63,7 +63,7 @@ Script.include("/~/system/libraries/controllerDispatcherUtils.js"); · 15 unmodified lines
6363
6464 this.endNearTrigger = function (controllerData) {
6565 var args = [this.hand === RIGHT_HAND ? "right" : "left", MyAvatar.sessionUUID];
66− Entities.callEntityMethod(this.targetEntityID, "endNearTrigger", args);
66+ Entities.callEntityMethod(this.targetEntityID, "stopNearTrigger", args);
6767 };
6868
6969 this.isReady = function (controllerData) {
scripts/system/controllers/controllerModules/overlayLaserInput.js+6−8
@@ -5,13 +5,11 @@ · 4 unmodified lines
55 // Distributed under the Apache License, Version 2.0.
66 // See the accompanying file LICENSE or http://www.apache.org/licenses/LICENSE-2.0.html
77
8−/* global Script, Entities, MyAvatar, Controller, RIGHT_HAND, LEFT_HAND,
9− NULL_UUID, enableDispatcherModule, disableDispatcherModule, makeRunningValues,
10− Messages, Quat, Vec3, getControllerWorldLocation, makeDispatcherModuleParameters, Overlays, ZERO_VEC,
11− AVATAR_SELF_ID, HMD, INCHES_TO_METERS, DEFAULT_REGISTRATION_POINT, Settings, getGrabPointSphereOffset,
12− COLORS_GRAB_SEARCHING_HALF_SQUEEZE, COLORS_GRAB_SEARCHING_FULL_SQUEEZE, COLORS_GRAB_DISTANCE_HOLD,
13− DEFAULT_SEARCH_SPHERE_DISTANCE, TRIGGER_ON_VALUE, TRIGGER_OFF_VALUE, getEnabledModuleByName, PICK_MAX_DISTANCE,
14− DISPATCHER_PROPERTIES
8+/* global Script, Entities, Controller, RIGHT_HAND, LEFT_HAND, NULL_UUID, enableDispatcherModule, disableDispatcherModule,
9+ makeRunningValues, Messages, Quat, Vec3, makeDispatcherModuleParameters, Overlays, ZERO_VEC, AVATAR_SELF_ID, HMD,
10+ INCHES_TO_METERS, DEFAULT_REGISTRATION_POINT, getGrabPointSphereOffset, COLORS_GRAB_SEARCHING_HALF_SQUEEZE,
11+ COLORS_GRAB_SEARCHING_FULL_SQUEEZE, COLORS_GRAB_DISTANCE_HOLD, DEFAULT_SEARCH_SPHERE_DISTANCE, TRIGGER_ON_VALUE,
12+ TRIGGER_OFF_VALUE, getEnabledModuleByName, PICK_MAX_DISTANCE, LaserPointers, RayPick, ContextOverlay
1513 */
1614
1715 Script.include("/~/system/libraries/controllerDispatcherUtils.js");
@@ -528,7 +526,7 @@ Script.include("/~/system/libraries/controllers.js"); · 510 unmodified lines
528526 joint: (this.hand === RIGHT_HAND) ? "_CONTROLLER_RIGHTHAND" : "_CONTROLLER_LEFTHAND",
529527 filter: RayPick.PICK_OVERLAYS,
530528 maxDistance: PICK_MAX_DISTANCE,
531− posOffset: getGrabPointSphereOffset(this.handToController()),
529+ posOffset: getGrabPointSphereOffset(this.handToController(), true),
532530 renderStates: renderStates,
533531 faceAvatar: true,
534532 defaultRenderStates: defaultRenderStates
scripts/system/controllers/controllerModules/scaleAvatar.js+5−5
@@ -7,9 +7,7 @@ · 6 unmodified lines
77 // Distributed under the Apache License, Version 2.0.
88 // See the accompanying file LICENSE or http://www.apache.org/licenses/LICENSE-2.0.html
99
10−/* global getEntityCustomData, flatten, Xform, Script, Quat, Vec3, MyAvatar, Entities, Overlays, Settings,
11− Reticle, Controller, Camera, Messages, Mat4, getControllerWorldLocation, getGrabPointSphereOffset,
12− setGrabCommunications, Menu, HMD, isInEditMode, AvatarList */
10+/* global Script, Vec3, MyAvatar, RIGHT_HAND */
1311 /* eslint indent: ["error", 4, { "outerIIFEBody": 0 }] */
1412
1513 (function () {
@@ -37,7 +35,8 @@ · 21 unmodified lines
3735 };
3836
3937 this.triggersPressed = function(controllerData) {
40− if (controllerData.triggerClicks[this.hand] && controllerData.secondaryValues[this.hand] > dispatcherUtils.BUMPER_ON_VALUE) {
38+ if (controllerData.triggerClicks[this.hand] &&
39+ controllerData.secondaryValues[this.hand] > dispatcherUtils.BUMPER_ON_VALUE) {
4140 return true;
4241 }
4342 return false;
@@ -58,7 +57,8 @@ · 14 unmodified lines
5857 var otherModule = this.getOtherModule();
5958 if (this.triggersPressed(controllerData) && otherModule.triggersPressed(controllerData)) {
6059 if (this.hand === dispatcherUtils.RIGHT_HAND) {
61− var scalingCurrentDistance = Vec3.length(Vec3.subtract(controllerData.controllerLocations[this.hand].position,
60+ var scalingCurrentDistance =
61+ Vec3.length(Vec3.subtract(controllerData.controllerLocations[this.hand].position,
6262 controllerData.controllerLocations[this.otherHand()].position));
6363
6464 var newAvatarScale = (scalingCurrentDistance / this.scalingStartDistance) * this.scalingStartAvatarScale;
scripts/system/controllers/controllerModules/tabletStylusInput.js+25−17
@@ -8,7 +8,8 @@ · 7 unmodified lines
88 /* global Script, Entities, MyAvatar, Controller, RIGHT_HAND, LEFT_HAND,
99 NULL_UUID, enableDispatcherModule, disableDispatcherModule, makeRunningValues,
1010 Messages, Quat, Vec3, getControllerWorldLocation, makeDispatcherModuleParameters, Overlays, ZERO_VEC,
11− AVATAR_SELF_ID, HMD, INCHES_TO_METERS, DEFAULT_REGISTRATION_POINT, Settings, getGrabPointSphereOffset
11+ AVATAR_SELF_ID, HMD, INCHES_TO_METERS, DEFAULT_REGISTRATION_POINT, Settings, getGrabPointSphereOffset,
12+ getEnabledModuleByName
1213 */
1314
1415 Script.include("/~/system/libraries/controllerDispatcherUtils.js");
@@ -356,7 +357,7 @@ Script.include("/~/system/libraries/controllers.js"); · 341 unmodified lines
356357 this.stylusTip = getControllerWorldLocation(this.handToController(), true);
357358
358359 // translate tip forward according to constant.
359− var TIP_OFFSET = {x: 0, y: WEB_STYLUS_LENGTH - WEB_TOUCH_Y_OFFSET, z: 0};
360+ var TIP_OFFSET = Vec3.multiply(MyAvatar.sensorToWorldScale, {x: 0, y: WEB_STYLUS_LENGTH - WEB_TOUCH_Y_OFFSET, z: 0});
360361 this.stylusTip.position = Vec3.sum(this.stylusTip.position,
361362 Vec3.multiplyQbyV(this.stylusTip.orientation, TIP_OFFSET));
362363 }
@@ -380,17 +381,17 @@ Script.include("/~/system/libraries/controllers.js"); · 17 unmodified lines
380381 return;
381382 }
382383
384+ var X_ROT_NEG_90 = { x: -0.70710678, y: 0, z: 0, w: 0.70710678 };
385+ var modelOrientation = Quat.multiply(this.stylusTip.orientation, X_ROT_NEG_90);
386+ var modelPositionOffset = Vec3.multiplyQbyV(modelOrientation, { x: 0, y: 0, z: MyAvatar.sensorToWorldScale * -WEB_STYLUS_LENGTH / 2 });
387+
383388 var stylusProperties = {
384389 name: "stylus",
385390 url: Script.resourcesPath() + "meshes/tablet-stylus-fat.fbx",
386391 loadPriority: 10.0,
387− localPosition: Vec3.sum({
388− x: 0.0,
389− y: WEB_TOUCH_Y_OFFSET,
390− z: 0.0
391− }, getGrabPointSphereOffset(this.handToController())),
392− localRotation: Quat.fromVec3Degrees({ x: -90, y: 0, z: 0 }),
393− dimensions: { x: 0.01, y: 0.01, z: WEB_STYLUS_LENGTH },
392+ position: Vec3.sum(this.stylusTip.position, modelPositionOffset),
393+ rotation: modelOrientation,
394+ dimensions: Vec3.multiply(MyAvatar.sensorToWorldScale, { x: 0.01, y: 0.01, z: WEB_STYLUS_LENGTH }),
394395 solid: true,
395396 visible: true,
396397 ignoreRayIntersection: true,
@@ -527,9 +528,11 @@ Script.include("/~/system/libraries/controllers.js"); · 130 unmodified lines
527528 hysteresisOffset = 0.05;
528529 }
529530
530− this.isNearStylusTarget = isNearStylusTarget(stylusTargets, EDGE_BORDER + hysteresisOffset,
531− TABLET_MIN_TOUCH_DISTANCE - hysteresisOffset,
532− WEB_DISPLAY_STYLUS_DISTANCE + hysteresisOffset);
531+ var sensorScaleFactor = MyAvatar.sensorToWorldScale;
532+ this.isNearStylusTarget = isNearStylusTarget(stylusTargets,
533+ (EDGE_BORDER + hysteresisOffset) * sensorScaleFactor,
534+ (TABLET_MIN_TOUCH_DISTANCE - hysteresisOffset) * sensorScaleFactor,
535+ (WEB_DISPLAY_STYLUS_DISTANCE + hysteresisOffset) * sensorScaleFactor);
533536
534537 if (this.isNearStylusTarget) {
535538 if (!this.useFingerInsteadOfStylus) {
@@ -544,8 +547,12 @@ Script.include("/~/system/libraries/controllers.js"); · 8 unmodified lines
544547
545548 var nearestStylusTarget = calculateNearestStylusTarget(stylusTargets);
546549
547− if (nearestStylusTarget && nearestStylusTarget.distance > TABLET_MIN_TOUCH_DISTANCE &&
548− nearestStylusTarget.distance < TABLET_MAX_HOVER_DISTANCE) {
550+ var SCALED_TABLET_MIN_TOUCH_DISTANCE = TABLET_MIN_TOUCH_DISTANCE * sensorScaleFactor;
551+ var SCALED_TABLET_MAX_TOUCH_DISTANCE = TABLET_MAX_TOUCH_DISTANCE * sensorScaleFactor;
552+ var SCALED_TABLET_MAX_HOVER_DISTANCE = TABLET_MAX_HOVER_DISTANCE * sensorScaleFactor;
553+
554+ if (nearestStylusTarget && nearestStylusTarget.distance > SCALED_TABLET_MIN_TOUCH_DISTANCE &&
555+ nearestStylusTarget.distance < SCALED_TABLET_MAX_HOVER_DISTANCE) {
549556
550557 this.requestTouchFocus(nearestStylusTarget);
551558
@@ -559,8 +566,8 @@ Script.include("/~/system/libraries/controllers.js"); · 7 unmodified lines
559566
560567 // filter out presses when tip is moving away from tablet.
561568 // ensure that stylus is within bounding box by checking normalizedPosition
562− if (nearestStylusTarget.valid && nearestStylusTarget.distance > TABLET_MIN_TOUCH_DISTANCE &&
563− nearestStylusTarget.distance < TABLET_MAX_TOUCH_DISTANCE &&
569+ if (nearestStylusTarget.valid && nearestStylusTarget.distance > SCALED_TABLET_MIN_TOUCH_DISTANCE &&
570+ nearestStylusTarget.distance < SCALED_TABLET_MAX_TOUCH_DISTANCE &&
564571 Vec3.dot(this.stylusTip.velocity, nearestStylusTarget.normal) < 0 &&
565572 nearestStylusTarget.normalizedPosition.x >= 0 && nearestStylusTarget.normalizedPosition.x <= 1 &&
566573 nearestStylusTarget.normalizedPosition.y >= 0 && nearestStylusTarget.normalizedPosition.y <= 1) {
@@ -647,7 +654,8 @@ Script.include("/~/system/libraries/controllers.js"); · 80 unmodified lines
647654 };
648655
649656 this.overlayLaserActive = function(controllerData) {
650− var overlayLaserModule = getEnabledModuleByName(this.hand === RIGHT_HAND ? "RightOverlayLaserInput" : "LeftOverlayLaserInput");
657+ var overlayLaserModule =
658+ getEnabledModuleByName(this.hand === RIGHT_HAND ? "RightOverlayLaserInput" : "LeftOverlayLaserInput");
651659 if (overlayLaserModule) {
652660 return overlayLaserModule.isReady(controllerData).active;
653661 }
scripts/system/controllers/controllerModules/teleport.js+45−17
@@ -8,11 +8,11 @@ · 7 unmodified lines
88 // Distributed under the Apache License, Version 2.0.
99 // See the accompanying file LICENSE or http://www.apache.org/licenses/LICENSE-2.0.html
1010
11+/* jslint bitwise: true */
1112
12−/* global Script, Entities, MyAvatar, Controller, RIGHT_HAND, LEFT_HAND, AVATAR_SELF_ID,
13− getControllerJointIndex, NULL_UUID, enableDispatcherModule, disableDispatcherModule,
14− Messages, makeDispatcherModuleParameters, makeRunningValues, Settings, entityHasActions,
15− Vec3, Overlays, flatten, Xform, getControllerWorldLocation, ensureDynamic
13+/* global Script, Entities, MyAvatar, Controller, RIGHT_HAND, LEFT_HAND, AVATAR_SELF_ID, getControllerJointIndex, NULL_UUID,
14+ enableDispatcherModule, disableDispatcherModule, Messages, makeDispatcherModuleParameters, makeRunningValues, Vec3,
15+ LaserPointers, RayPick, HMD, Uuid, AvatarList
1616 */
1717 /* eslint indent: ["error", 4, { "outerIIFEBody": 0 }] */
1818
@@ -111,7 +111,7 @@ var seatEnd = { · 92 unmodified lines
111111 url: SEAT_MODEL_URL,
112112 dimensions: TARGET_MODEL_DIMENSIONS,
113113 ignoreRayIntersection: true
114−}
114+};
115115
116116 var teleportRenderStates = [{name: "cancel", path: cancelPath, end: cancelEnd},
117117 {name: "teleport", path: teleportPath, end: teleportEnd},
@@ -228,8 +228,8 @@ function Teleporter(hand) { · 110 unmodified lines
228228
229229 this.buttonPress = function(value) {
230230 _this.buttonValue = value;
231− }
232−
231+ };
232+
233233 this.parameters = makeDispatcherModuleParameters(
234234 80,
235235 this.hand === RIGHT_HAND ? ["rightHand"] : ["leftHand"],
@@ -247,9 +247,36 @@ function Teleporter(hand) { · 11 unmodified lines
247247 _this.state = TELEPORTER_STATES.TARGETTING;
248248 }
249249 }, COOL_IN_DURATION);
250+
251+ // pad scale with avatar size
252+ var AVATAR_PROPORTIONAL_TARGET_MODEL_DIMENSIONS = Vec3.multiply(MyAvatar.sensorToWorldScale, TARGET_MODEL_DIMENSIONS);
253+
254+ if (!Vec3.equal(AVATAR_PROPORTIONAL_TARGET_MODEL_DIMENSIONS, cancelEnd.dimensions)) {
255+ cancelEnd.dimensions = AVATAR_PROPORTIONAL_TARGET_MODEL_DIMENSIONS;
256+ teleportEnd.dimensions = AVATAR_PROPORTIONAL_TARGET_MODEL_DIMENSIONS;
257+ seatEnd.dimensions = AVATAR_PROPORTIONAL_TARGET_MODEL_DIMENSIONS;
258+
259+ teleportRenderStates = [{name: "cancel", path: cancelPath, end: cancelEnd},
260+ {name: "teleport", path: teleportPath, end: teleportEnd},
261+ {name: "seat", path: seatPath, end: seatEnd}];
262+
263+ LaserPointers.editRenderState(this.teleportRayHandVisible, "cancel", teleportRenderStates[0]);
264+ LaserPointers.editRenderState(this.teleportRayHandInvisible, "cancel", teleportRenderStates[0]);
265+ LaserPointers.editRenderState(this.teleportRayHeadVisible, "cancel", teleportRenderStates[0]);
266+ LaserPointers.editRenderState(this.teleportRayHeadInvisible, "cancel", teleportRenderStates[0]);
267+
268+ LaserPointers.editRenderState(this.teleportRayHandVisible, "teleport", teleportRenderStates[1]);
269+ LaserPointers.editRenderState(this.teleportRayHandInvisible, "teleport", teleportRenderStates[1]);
270+ LaserPointers.editRenderState(this.teleportRayHeadVisible, "teleport", teleportRenderStates[1]);
271+ LaserPointers.editRenderState(this.teleportRayHeadInvisible, "teleport", teleportRenderStates[1]);
272+
273+ LaserPointers.editRenderState(this.teleportRayHandVisible, "seat", teleportRenderStates[2]);
274+ LaserPointers.editRenderState(this.teleportRayHandInvisible, "seat", teleportRenderStates[2]);
275+ LaserPointers.editRenderState(this.teleportRayHeadVisible, "seat", teleportRenderStates[2]);
276+ LaserPointers.editRenderState(this.teleportRayHeadInvisible, "seat", teleportRenderStates[2]);
277+ }
250278 };
251279
252−
253280 this.isReady = function(controllerData, deltaTime) {
254281 var otherModule = this.getOtherModule();
255282 if (_this.buttonValue !== 0 && !otherModule.active) {
@@ -259,7 +286,7 @@ function Teleporter(hand) { · 3 unmodified lines
259286 }
260287 return makeRunningValues(false, [], []);
261288 };
262−
289+
263290 this.run = function(controllerData, deltaTime) {
264291 //_this.state = TELEPORTER_STATES.TARGETTING;
265292
@@ -301,7 +328,6 @@ function Teleporter(hand) { · 35 unmodified lines
301328 } else {
302329 result = LaserPointers.getPrevRayPickResult(_this.teleportRayHandVisible);
303330 }
304−
305331 teleportLocationType = getTeleportTargetType(result);
306332 }
307333
@@ -327,7 +353,7 @@ function Teleporter(hand) { · 19 unmodified lines
327353 if (_this.buttonValue !== 0) {
328354 return makeRunningValues(true, [], []);
329355 }
330−
356+
331357 if (target === TARGET.NONE || target === TARGET.INVALID || this.state === TELEPORTER_STATES.COOL_IN) {
332358 // Do nothing
333359 } else if (target === TARGET.SEAT) {
@@ -362,7 +388,7 @@ function Teleporter(hand) { · 28 unmodified lines
362388 }
363389 };
364390 }
365−
391+
366392 // related to repositioning the avatar after you teleport
367393 var FOOT_JOINT_NAMES = ["RightToe_End", "RightToeBase", "RightFoot"];
368394 var DEFAULT_ROOT_TO_FOOT_OFFSET = 0.5;
@@ -475,7 +501,7 @@ function Teleporter(hand) { · 106 unmodified lines
475501 disableDispatcherModule("RightTeleporter");
476502 }
477503 Script.scriptEnding.connect(cleanup);
478−
504+
479505 var setIgnoreEntities = function() {
480506 LaserPointers.setIgnoreEntities(teleporter.teleportRayRightVisible, ignoredEntities);
481507 LaserPointers.setIgnoreEntities(teleporter.teleportRayRightInvisible, ignoredEntities);
@@ -483,8 +509,8 @@ function Teleporter(hand) { · 1 unmodified line
483509 LaserPointers.setIgnoreEntities(teleporter.teleportRayLeftInvisible, ignoredEntities);
484510 LaserPointers.setIgnoreEntities(teleporter.teleportRayHeadVisible, ignoredEntities);
485511 LaserPointers.setIgnoreEntities(teleporter.teleportRayHeadInvisible, ignoredEntities);
486− }
487−
512+ };
513+
488514 var isDisabled = false;
489515 var handleTeleportMessages = function(channel, message, sender) {
490516 if (sender === MyAvatar.sessionUUID) {
@@ -501,7 +527,9 @@ function Teleporter(hand) { · 10 unmodified lines
501527 if (message === 'none') {
502528 isDisabled = false;
503529 }
504− } else if (channel === 'Hifi-Teleport-Ignore-Add' && !Uuid.isNull(message) && ignoredEntities.indexOf(message) === -1) {
530+ } else if (channel === 'Hifi-Teleport-Ignore-Add' &&
531+ !Uuid.isNull(message) &&
532+ ignoredEntities.indexOf(message) === -1) {
505533 ignoredEntities.push(message);
506534 setIgnoreEntities();
507535 } else if (channel === 'Hifi-Teleport-Ignore-Remove' && !Uuid.isNull(message)) {
@@ -513,7 +541,7 @@ function Teleporter(hand) { · 5 unmodified lines
513541 }
514542 }
515543 };
516−
544+
517545 Messages.subscribe('Hifi-Teleport-Disabler');
518546 Messages.subscribe('Hifi-Teleport-Ignore-Add');
519547 Messages.subscribe('Hifi-Teleport-Ignore-Remove');
scripts/system/controllers/controllerModules/webEntityLaserInput.js+4−7
@@ -7,13 +7,10 @@ · 6 unmodified lines
77
88 /* jslint bitwise: true */
99
10−/* global Script, Controller, LaserPointers, RayPick, RIGHT_HAND, LEFT_HAND, Mat4, MyAvatar, Vec3, Camera, Quat,
11− getGrabPointSphereOffset, getEnabledModuleByName, makeRunningValues, Entities, NULL_UUID,
12− enableDispatcherModule, disableDispatcherModule, entityIsDistanceGrabbable,
13− makeDispatcherModuleParameters, MSECS_PER_SEC, HAPTIC_PULSE_STRENGTH, HAPTIC_PULSE_DURATION,
10+/* global Script, Controller, LaserPointers, RayPick, RIGHT_HAND, LEFT_HAND, Vec3, Quat, getGrabPointSphereOffset,
11+ makeRunningValues, Entities, NULL_UUID, enableDispatcherModule, disableDispatcherModule, makeDispatcherModuleParameters,
1412 PICK_MAX_DISTANCE, COLORS_GRAB_SEARCHING_HALF_SQUEEZE, COLORS_GRAB_SEARCHING_FULL_SQUEEZE, COLORS_GRAB_DISTANCE_HOLD,
15− AVATAR_SELF_ID, DEFAULT_SEARCH_SPHERE_DISTANCE, TRIGGER_OFF_VALUE, TRIGGER_ON_VALUE, ZERO_VEC
16−
13+ AVATAR_SELF_ID, DEFAULT_SEARCH_SPHERE_DISTANCE, TRIGGER_ON_VALUE, ZERO_VEC, Overlays
1714 */
1815
1916 Script.include("/~/system/libraries/controllerDispatcherUtils.js");
@@ -459,7 +456,7 @@ Script.include("/~/system/libraries/controllers.js"); · 439 unmodified lines
459456 joint: (this.hand === RIGHT_HAND) ? "_CONTROLLER_RIGHTHAND" : "_CONTROLLER_LEFTHAND",
460457 filter: RayPick.PICK_ENTITIES,
461458 maxDistance: PICK_MAX_DISTANCE,
462− posOffset: getGrabPointSphereOffset(this.handToController()),
459+ posOffset: getGrabPointSphereOffset(this.handToController(), true),
463460 renderStates: renderStates,
464461 faceAvatar: true,
465462 defaultRenderStates: defaultRenderStates

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t