mirror of
https://github.com/Armored-Dragon/overte.git
synced 2025-03-11 16:13:16 +01:00
check controller triggered in checkControllerMove
This commit is contained in:
parent
f33fae30ed
commit
3bcc727d47
1 changed files with 1 additions and 17 deletions
|
@ -969,7 +969,7 @@ SelectionDisplay = (function() {
|
||||||
if (SelectionManager.hasSelection()) {
|
if (SelectionManager.hasSelection()) {
|
||||||
var controllerPose = getControllerWorldLocation(activeHand, true);
|
var controllerPose = getControllerWorldLocation(activeHand, true);
|
||||||
var hand = (activeHand === Controller.Standard.LeftHand) ? 0 : 1;
|
var hand = (activeHand === Controller.Standard.LeftHand) ? 0 : 1;
|
||||||
if (controllerPose.valid && lastControllerPoses[hand].valid) {
|
if (controllerPose.valid && lastControllerPoses[hand].valid && that.triggered) {
|
||||||
if (!Vec3.equal(controllerPose.position, lastControllerPoses[hand].position) ||
|
if (!Vec3.equal(controllerPose.position, lastControllerPoses[hand].position) ||
|
||||||
!Vec3.equal(controllerPose.rotation, lastControllerPoses[hand].rotation)) {
|
!Vec3.equal(controllerPose.rotation, lastControllerPoses[hand].rotation)) {
|
||||||
that.mouseMoveEvent({});
|
that.mouseMoveEvent({});
|
||||||
|
@ -1656,10 +1656,6 @@ SelectionDisplay = (function() {
|
||||||
return (origin.y - intersection.y) / Vec3.distance(origin, intersection);
|
return (origin.y - intersection.y) / Vec3.distance(origin, intersection);
|
||||||
},
|
},
|
||||||
onMove: function(event) {
|
onMove: function(event) {
|
||||||
if (event.x === undefined || event.y === undefined) {
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
var wantDebug = false;
|
var wantDebug = false;
|
||||||
var pickRay = generalComputePickRay(event.x, event.y);
|
var pickRay = generalComputePickRay(event.x, event.y);
|
||||||
|
|
||||||
|
@ -1817,10 +1813,6 @@ SelectionDisplay = (function() {
|
||||||
pushCommandForSelections(duplicatedEntityIDs);
|
pushCommandForSelections(duplicatedEntityIDs);
|
||||||
},
|
},
|
||||||
onMove: function(event) {
|
onMove: function(event) {
|
||||||
if (event.x === undefined || event.y === undefined) {
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
var pickRay = generalComputePickRay(event.x, event.y);
|
var pickRay = generalComputePickRay(event.x, event.y);
|
||||||
|
|
||||||
// Use previousPickRay if new pickRay will cause resulting rayPlaneIntersection values to wrap around
|
// Use previousPickRay if new pickRay will cause resulting rayPlaneIntersection values to wrap around
|
||||||
|
@ -2071,10 +2063,6 @@ SelectionDisplay = (function() {
|
||||||
};
|
};
|
||||||
|
|
||||||
var onMove = function(event) {
|
var onMove = function(event) {
|
||||||
if (event.x === undefined || event.y === undefined) {
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
var proportional = directionEnum === STRETCH_DIRECTION.ALL;
|
var proportional = directionEnum === STRETCH_DIRECTION.ALL;
|
||||||
|
|
||||||
var position, rotation;
|
var position, rotation;
|
||||||
|
@ -2408,10 +2396,6 @@ SelectionDisplay = (function() {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (event.x === undefined || event.y === undefined) {
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
var wantDebug = false;
|
var wantDebug = false;
|
||||||
if (wantDebug) {
|
if (wantDebug) {
|
||||||
print("================== "+ getMode() + "(addHandleRotateTool onMove) -> =======================");
|
print("================== "+ getMode() + "(addHandleRotateTool onMove) -> =======================");
|
||||||
|
|
Loading…
Reference in a new issue