mirror of
https://github.com/overte-org/overte.git
synced 2025-08-09 14:29:03 +02:00
Always show hand lasers when in edit mode.
This commit is contained in:
parent
8479d835b2
commit
ecf3826050
2 changed files with 28 additions and 3 deletions
|
@ -1330,7 +1330,7 @@ function MyController(hand) {
|
||||||
if (this.stylus) {
|
if (this.stylus) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
var stylusProperties = {
|
var stylusProperties = {
|
||||||
name: "stylus",
|
name: "stylus",
|
||||||
url: Script.resourcesPath() + "meshes/tablet-stylus-fat.fbx",
|
url: Script.resourcesPath() + "meshes/tablet-stylus-fat.fbx",
|
||||||
|
@ -1420,6 +1420,14 @@ function MyController(hand) {
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
// Turns off indicators used for searching. Overlay line and sphere.
|
||||||
|
this.searchIndicatorOff = function() {
|
||||||
|
this.searchSphereOff();
|
||||||
|
if (PICK_WITH_HAND_RAY) {
|
||||||
|
this.overlayLineOff();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
this.otherGrabbingLineOn = function(avatarPosition, entityPosition, color) {
|
this.otherGrabbingLineOn = function(avatarPosition, entityPosition, color) {
|
||||||
if (this.otherGrabbingLine === null) {
|
if (this.otherGrabbingLine === null) {
|
||||||
var lineProperties = {
|
var lineProperties = {
|
||||||
|
@ -1791,6 +1799,15 @@ function MyController(hand) {
|
||||||
}
|
}
|
||||||
|
|
||||||
this.processStylus();
|
this.processStylus();
|
||||||
|
|
||||||
|
if (isInEditMode() && !this.isNearStylusTarget) {
|
||||||
|
// Always showing lasers while in edit mode and hands/stylus is not active.
|
||||||
|
var rayPickInfo = this.calcRayPickInfo(this.hand);
|
||||||
|
this.intersectionDistance = (rayPickInfo.entityID || rayPickInfo.overlayID) ? rayPickInfo.distance : 0;
|
||||||
|
this.searchIndicatorOn(rayPickInfo.searchRay);
|
||||||
|
} else {
|
||||||
|
this.searchIndicatorOff();
|
||||||
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
this.handleLaserOnHomeButton = function(rayPickInfo) {
|
this.handleLaserOnHomeButton = function(rayPickInfo) {
|
||||||
|
@ -2281,7 +2298,7 @@ function MyController(hand) {
|
||||||
if (this.getOtherHandController().state === STATE_DISTANCE_HOLDING) {
|
if (this.getOtherHandController().state === STATE_DISTANCE_HOLDING) {
|
||||||
this.setState(STATE_DISTANCE_ROTATING, "distance rotate '" + name + "'");
|
this.setState(STATE_DISTANCE_ROTATING, "distance rotate '" + name + "'");
|
||||||
} else {
|
} else {
|
||||||
this.setState(STATE_DISTANCE_HOLDING, "distance hold '" + name + "'");
|
this.setState(STATE_DISTANCE_HOLDING, "distance hold '" + name + "'");
|
||||||
}
|
}
|
||||||
return;
|
return;
|
||||||
} else {
|
} else {
|
||||||
|
@ -3346,7 +3363,14 @@ function MyController(hand) {
|
||||||
};
|
};
|
||||||
|
|
||||||
this.offEnter = function() {
|
this.offEnter = function() {
|
||||||
|
// Reuse the existing search distance if lasers were active since
|
||||||
|
// they will be shown in OFF state while in edit mode.
|
||||||
|
var existingSearchDistance = this.searchSphereDistance;
|
||||||
this.release();
|
this.release();
|
||||||
|
|
||||||
|
if (isInEditMode()) {
|
||||||
|
this.searchSphereDistance = existingSearchDistance;
|
||||||
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
this.entityLaserTouchingEnter = function() {
|
this.entityLaserTouchingEnter = function() {
|
||||||
|
|
|
@ -12,7 +12,8 @@
|
||||||
// See the accompanying file LICENSE or http://www.apache.org/licenses/LICENSE-2.0.html
|
// See the accompanying file LICENSE or http://www.apache.org/licenses/LICENSE-2.0.html
|
||||||
//
|
//
|
||||||
|
|
||||||
/* global Script, SelectionDisplay, LightOverlayManager, CameraManager, Grid, GridTool, EntityListTool, Vec3, SelectionManager, Overlays, OverlayWebWindow, UserActivityLogger, Settings, Entities, Tablet, Toolbars, Messages, Menu, Camera, progressDialog, tooltip, MyAvatar, Quat, Controller, Clipboard, HMD, UndoStack, ParticleExplorerTool */
|
/* global Script, SelectionDisplay, LightOverlayManager, CameraManager, Grid, GridTool, EntityListTool, Vec3, SelectionManager, Overlays, OverlayWebWindow, UserActivityLogger,
|
||||||
|
Settings, Entities, Tablet, Toolbars, Messages, Menu, Camera, progressDialog, tooltip, MyAvatar, Quat, Controller, Clipboard, HMD, UndoStack, ParticleExplorerTool */
|
||||||
|
|
||||||
(function() { // BEGIN LOCAL_SCOPE
|
(function() { // BEGIN LOCAL_SCOPE
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue