mirror of
https://github.com/overte-org/overte.git
synced 2025-08-08 12:57:59 +02:00
Merge pull request #12714 from dback2/editUpDownArrowFix
Fix Y arrow translation handle issues
This commit is contained in:
commit
89127a06b3
1 changed files with 8 additions and 9 deletions
|
@ -1663,11 +1663,11 @@ SelectionDisplay = (function() {
|
||||||
mode: mode,
|
mode: mode,
|
||||||
onBegin: function(event, pickRay, pickResult) {
|
onBegin: function(event, pickRay, pickResult) {
|
||||||
if (direction === TRANSLATE_DIRECTION.X) {
|
if (direction === TRANSLATE_DIRECTION.X) {
|
||||||
pickNormal = { x:0, y:0, z:1 };
|
pickNormal = { x:0, y:1, z:1 };
|
||||||
} else if (direction === TRANSLATE_DIRECTION.Y) {
|
} else if (direction === TRANSLATE_DIRECTION.Y) {
|
||||||
pickNormal = { x:1, y:0, z:0 };
|
pickNormal = { x:1, y:0, z:1 };
|
||||||
} else if (direction === TRANSLATE_DIRECTION.Z) {
|
} else if (direction === TRANSLATE_DIRECTION.Z) {
|
||||||
pickNormal = { x:0, y:1, z:0 };
|
pickNormal = { x:1, y:1, z:0 };
|
||||||
}
|
}
|
||||||
|
|
||||||
var rotation = spaceMode === SPACE_LOCAL ? SelectionManager.localRotation : SelectionManager.worldRotation;
|
var rotation = spaceMode === SPACE_LOCAL ? SelectionManager.localRotation : SelectionManager.worldRotation;
|
||||||
|
@ -1711,7 +1711,6 @@ SelectionDisplay = (function() {
|
||||||
onMove: function(event) {
|
onMove: function(event) {
|
||||||
pickRay = generalComputePickRay(event.x, event.y);
|
pickRay = generalComputePickRay(event.x, event.y);
|
||||||
|
|
||||||
// translate mode left/right based on view toward entity
|
|
||||||
var newIntersection = rayPlaneIntersection(pickRay, SelectionManager.worldPosition, pickNormal);
|
var newIntersection = rayPlaneIntersection(pickRay, SelectionManager.worldPosition, pickNormal);
|
||||||
var vector = Vec3.subtract(newIntersection, lastPick);
|
var vector = Vec3.subtract(newIntersection, lastPick);
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue