mirror of
https://github.com/overte-org/overte.git
synced 2025-04-20 18:23:54 +02:00
Merge branch 'controller-dispatcher-1' of github.com:druiz17/hifi into controller-dispatcher-1
This commit is contained in:
commit
9c098f1a0c
4 changed files with 6 additions and 7 deletions
|
@ -137,7 +137,7 @@ Script.include("/~/system/libraries/controllers.js");
|
|||
var dim = {x: radius, y: radius, z: radius};
|
||||
var mode = "hold";
|
||||
if (!this.distanceHolding && !this.distanceRotating) {
|
||||
if (controllerData.triggerClicks[this.hand]) {
|
||||
if (controllerData.triggerValues[this.hand] === 1) {
|
||||
mode = "full";
|
||||
} else {
|
||||
mode = "half";
|
||||
|
@ -367,8 +367,6 @@ Script.include("/~/system/libraries/controllers.js");
|
|||
otherFarGrabModule.offsetPosition = Vec3.multiplyQbyV(controllerRotationDelta,
|
||||
otherFarGrabModule.offsetPosition);
|
||||
|
||||
this.updateLaserPointer();
|
||||
|
||||
this.previousWorldControllerRotation = worldControllerRotation;
|
||||
};
|
||||
|
||||
|
@ -434,6 +432,8 @@ Script.include("/~/system/libraries/controllers.js");
|
|||
return makeRunningValues(false, [], []);
|
||||
}
|
||||
|
||||
this.updateLaserPointer(controllerData);
|
||||
|
||||
var otherModuleName =this.hand === RIGHT_HAND ? "LeftFarActionGrabEntity" : "RightFarActionGrabEntity";
|
||||
var otherFarGrabModule = getEnabledModuleByName(otherModuleName);
|
||||
|
||||
|
|
|
@ -151,7 +151,7 @@ Script.include("/~/system/libraries/cloneEntityUtils.js");
|
|||
if (props.distance > NEAR_GRAB_RADIUS) {
|
||||
break;
|
||||
}
|
||||
if (entityIsGrabbable(props)) {
|
||||
if (entityIsGrabbable(props) || entityIsCloneable(props)) {
|
||||
// if we've attempted to grab a child, roll up to the root of the tree
|
||||
var groupRootProps = findGroupParent(controllerData, props);
|
||||
if (entityIsGrabbable(groupRootProps)) {
|
||||
|
@ -172,7 +172,7 @@ Script.include("/~/system/libraries/cloneEntityUtils.js");
|
|||
|
||||
var targetProps = this.getTargetProps(controllerData);
|
||||
if (targetProps) {
|
||||
if (!propsArePhysical(targetProps) && !propsAreCloneDynamic) {
|
||||
if (!propsArePhysical(targetProps) && !propsAreCloneDynamic(targetProps)) {
|
||||
return makeRunningValues(false, [], []); // let nearParentGrabEntity handle it
|
||||
} else {
|
||||
this.targetEntityID = targetProps.id;
|
||||
|
|
|
@ -20,7 +20,7 @@ Script.include("/~/system/libraries/controllers.js");
|
|||
var HAPTIC_STYLUS_STRENGTH = 1.0;
|
||||
var HAPTIC_STYLUS_DURATION = 20.0;
|
||||
|
||||
var WEB_DISPLAY_STYLUS_DISTANCE = 0.2;
|
||||
var WEB_DISPLAY_STYLUS_DISTANCE = 0.1;
|
||||
var WEB_STYLUS_LENGTH = 0.2;
|
||||
var WEB_TOUCH_Y_OFFSET = 0.05; // how far forward (or back with a negative number) to slide stylus in hand
|
||||
|
||||
|
|
|
@ -36,7 +36,6 @@ entityIsCloneable = function(props) {
|
|||
var grabbableData = getGrabbableData(props);
|
||||
return grabbableData.cloneable;
|
||||
}
|
||||
|
||||
return false;
|
||||
};
|
||||
|
||||
|
|
Loading…
Reference in a new issue