mirror of
https://github.com/overte-org/overte.git
synced 2025-04-29 23:02:40 +02:00
Merge branch 'master' of https://github.com/highfidelity/hifi into hdr
This commit is contained in:
commit
8784f70a1a
2 changed files with 7 additions and 6 deletions
|
@ -26,7 +26,7 @@ var WANT_DEBUG = false;
|
||||||
var WANT_DEBUG_STATE = false;
|
var WANT_DEBUG_STATE = false;
|
||||||
var WANT_DEBUG_SEARCH_NAME = null;
|
var WANT_DEBUG_SEARCH_NAME = null;
|
||||||
|
|
||||||
var FORCE_IGNORE_IK = true;
|
var FORCE_IGNORE_IK = false;
|
||||||
var SHOW_GRAB_POINT_SPHERE = true;
|
var SHOW_GRAB_POINT_SPHERE = true;
|
||||||
|
|
||||||
//
|
//
|
||||||
|
@ -1382,10 +1382,11 @@ function MyController(hand) {
|
||||||
this.chooseBestEquipHotspot = function(candidateEntities) {
|
this.chooseBestEquipHotspot = function(candidateEntities) {
|
||||||
var DISTANCE = 0;
|
var DISTANCE = 0;
|
||||||
var equippableHotspots = this.chooseNearEquipHotspots(candidateEntities, DISTANCE);
|
var equippableHotspots = this.chooseNearEquipHotspots(candidateEntities, DISTANCE);
|
||||||
|
var _this = this;
|
||||||
if (equippableHotspots.length > 0) {
|
if (equippableHotspots.length > 0) {
|
||||||
// sort by distance
|
// sort by distance
|
||||||
equippableHotspots.sort(function(a, b) {
|
equippableHotspots.sort(function(a, b) {
|
||||||
var handControllerLocation = getControllerWorldLocation(this.handToController(), true);
|
var handControllerLocation = getControllerWorldLocation(_this.handToController(), true);
|
||||||
var aDistance = Vec3.distance(a.worldPosition, handControllerLocation.position);
|
var aDistance = Vec3.distance(a.worldPosition, handControllerLocation.position);
|
||||||
var bDistance = Vec3.distance(b.worldPosition, handControllerLocation.position);
|
var bDistance = Vec3.distance(b.worldPosition, handControllerLocation.position);
|
||||||
return aDistance - bDistance;
|
return aDistance - bDistance;
|
||||||
|
@ -1896,7 +1897,7 @@ function MyController(hand) {
|
||||||
if (FORCE_IGNORE_IK) {
|
if (FORCE_IGNORE_IK) {
|
||||||
this.ignoreIK = true;
|
this.ignoreIK = true;
|
||||||
} else {
|
} else {
|
||||||
this.ignoreIK = grabbableData.ignoreIK ? grabbableData.ignoreIK : false;
|
this.ignoreIK = (grabbableData.ignoreIK !== undefined) ? grabbableData.ignoreIK : true;
|
||||||
}
|
}
|
||||||
|
|
||||||
var handRotation;
|
var handRotation;
|
||||||
|
|
|
@ -830,7 +830,7 @@ function loaded() {
|
||||||
|
|
||||||
elGrabbable.checked = properties.dynamic;
|
elGrabbable.checked = properties.dynamic;
|
||||||
elWantsTrigger.checked = false;
|
elWantsTrigger.checked = false;
|
||||||
elIgnoreIK.checked = false;
|
elIgnoreIK.checked = true;
|
||||||
var parsedUserData = {}
|
var parsedUserData = {}
|
||||||
try {
|
try {
|
||||||
parsedUserData = JSON.parse(properties.userData);
|
parsedUserData = JSON.parse(properties.userData);
|
||||||
|
@ -1143,7 +1143,7 @@ function loaded() {
|
||||||
userDataChanger("grabbableKey", "wantsTrigger", elWantsTrigger, elUserData, false);
|
userDataChanger("grabbableKey", "wantsTrigger", elWantsTrigger, elUserData, false);
|
||||||
});
|
});
|
||||||
elIgnoreIK.addEventListener('change', function() {
|
elIgnoreIK.addEventListener('change', function() {
|
||||||
userDataChanger("grabbableKey", "ignoreIK", elIgnoreIK, elUserData, false);
|
userDataChanger("grabbableKey", "ignoreIK", elIgnoreIK, elUserData, true);
|
||||||
});
|
});
|
||||||
|
|
||||||
elCollisionSoundURL.addEventListener('change', createEmitTextPropertyUpdateFunction('collisionSoundURL'));
|
elCollisionSoundURL.addEventListener('change', createEmitTextPropertyUpdateFunction('collisionSoundURL'));
|
||||||
|
@ -1596,4 +1596,4 @@ function loaded() {
|
||||||
document.addEventListener("contextmenu", function(event) {
|
document.addEventListener("contextmenu", function(event) {
|
||||||
event.preventDefault();
|
event.preventDefault();
|
||||||
}, false);
|
}, false);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue