mirror of
https://github.com/HifiExperiments/overte.git
synced 2025-08-09 08:21:32 +02:00
reduced radius of grab sphere
This commit is contained in:
parent
bec71e4af4
commit
6f6fe5f244
1 changed files with 9 additions and 6 deletions
|
@ -45,6 +45,10 @@ var DRAW_GRAB_BOXES = false;
|
||||||
var DRAW_HAND_SPHERES = false;
|
var DRAW_HAND_SPHERES = false;
|
||||||
var DROP_WITHOUT_SHAKE = false;
|
var DROP_WITHOUT_SHAKE = false;
|
||||||
|
|
||||||
|
var EQUIP_SPHERE_COLOR = { red: 179, green: 120, blue: 211 };
|
||||||
|
var EQUIP_SPHERE_ALPHA = 0.15;
|
||||||
|
var EQUIP_SPHERE_SCALE_FACTOR = 0.65;
|
||||||
|
|
||||||
//
|
//
|
||||||
// distant manipulation
|
// distant manipulation
|
||||||
//
|
//
|
||||||
|
@ -939,13 +943,12 @@ function MyController(hand) {
|
||||||
overlays: []
|
overlays: []
|
||||||
};
|
};
|
||||||
|
|
||||||
var EQUIP_SPHERE_COLOR = { red: 179, green: 120, blue: 211 };
|
var diameter = hotspot.radius * 2;
|
||||||
var EQUIP_SPHERE_ALPHA = 0.3;
|
|
||||||
|
|
||||||
overlayInfoSet.overlays.push(Overlays.addOverlay("sphere", {
|
overlayInfoSet.overlays.push(Overlays.addOverlay("sphere", {
|
||||||
position: hotspot.worldPosition,
|
position: hotspot.worldPosition,
|
||||||
rotation: {x: 0, y: 0, z: 0, w: 1},
|
rotation: {x: 0, y: 0, z: 0, w: 1},
|
||||||
size: hotspot.radius * 2,
|
dimensions: diameter * EQUIP_SPHERE_SCALE_FACTOR,
|
||||||
color: EQUIP_SPHERE_COLOR,
|
color: EQUIP_SPHERE_COLOR,
|
||||||
alpha: EQUIP_SPHERE_ALPHA,
|
alpha: EQUIP_SPHERE_ALPHA,
|
||||||
solid: true,
|
solid: true,
|
||||||
|
@ -960,12 +963,12 @@ function MyController(hand) {
|
||||||
this.updateOverlayInfoSet = function (overlayInfoSet, timestamp, potentialEquipHotspot) {
|
this.updateOverlayInfoSet = function (overlayInfoSet, timestamp, potentialEquipHotspot) {
|
||||||
overlayInfoSet.timestamp = timestamp;
|
overlayInfoSet.timestamp = timestamp;
|
||||||
|
|
||||||
var radius = overlayInfoSet.hotspot.radius;
|
var diameter = overlayInfoSet.hotspot.radius * 2;
|
||||||
|
|
||||||
// embiggen the overlays if it maches the potentialEquipHotspot
|
// embiggen the overlays if it maches the potentialEquipHotspot
|
||||||
if (potentialEquipHotspot && overlayInfoSet.entityID == potentialEquipHotspot.entityID &&
|
if (potentialEquipHotspot && overlayInfoSet.entityID == potentialEquipHotspot.entityID &&
|
||||||
Vec3.equal(overlayInfoSet.localPosition, potentialEquipHotspot.localPosition)) {
|
Vec3.equal(overlayInfoSet.localPosition, potentialEquipHotspot.localPosition)) {
|
||||||
radius = radius * EQUIP_RADIUS_EMBIGGEN_FACTOR;
|
diameter = diameter * EQUIP_RADIUS_EMBIGGEN_FACTOR;
|
||||||
}
|
}
|
||||||
|
|
||||||
var props = _this.entityPropertyCache.getProps(overlayInfoSet.entityID);
|
var props = _this.entityPropertyCache.getProps(overlayInfoSet.entityID);
|
||||||
|
@ -976,7 +979,7 @@ function MyController(hand) {
|
||||||
Overlays.editOverlay(overlay, {
|
Overlays.editOverlay(overlay, {
|
||||||
position: position,
|
position: position,
|
||||||
rotation: props.rotation,
|
rotation: props.rotation,
|
||||||
dimensions: radius * 2
|
dimensions: diameter * EQUIP_SPHERE_SCALE_FACTOR
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
|
Loading…
Reference in a new issue