mirror of
https://github.com/overte-org/overte.git
synced 2025-08-04 06:23:35 +02:00
Show hand-sphere search line and point just with hand direction again
This commit is contained in:
parent
118f919c8b
commit
0d4ac4387a
1 changed files with 3 additions and 4 deletions
|
@ -789,7 +789,8 @@ function MyController(hand) {
|
||||||
|
|
||||||
var distantPickRay = {
|
var distantPickRay = {
|
||||||
origin: Camera.position,
|
origin: Camera.position,
|
||||||
direction: Quat.getFront(Quat.multiply(Camera.orientation, handDeltaRotation)),
|
//direction: Quat.getFront(Quat.multiply(Camera.orientation, handDeltaRotation)),
|
||||||
|
direction: Quat.getUp(this.getHandRotation()),
|
||||||
length: PICK_MAX_DISTANCE
|
length: PICK_MAX_DISTANCE
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -1022,9 +1023,7 @@ function MyController(hand) {
|
||||||
searchSphereLocation.y -= ((this.intersectionDistance - this.searchSphereDistance) / this.intersectionDistance) * SEARCH_SPHERE_CHASE_DROP;
|
searchSphereLocation.y -= ((this.intersectionDistance - this.searchSphereDistance) / this.intersectionDistance) * SEARCH_SPHERE_CHASE_DROP;
|
||||||
this.searchSphereOn(searchSphereLocation, SPHERE_INTERSECTION_SIZE * this.intersectionDistance, this.triggerSmoothedGrab() ? INTERSECT_COLOR : NO_INTERSECT_COLOR);
|
this.searchSphereOn(searchSphereLocation, SPHERE_INTERSECTION_SIZE * this.intersectionDistance, this.triggerSmoothedGrab() ? INTERSECT_COLOR : NO_INTERSECT_COLOR);
|
||||||
if (USE_OVERLAY_LINES_FOR_SEARCHING === true) {
|
if (USE_OVERLAY_LINES_FOR_SEARCHING === true) {
|
||||||
var OVERLAY_BEAM_SETBACK = 0.9;
|
this.overlayLineOn(handPosition, searchSphereLocation, this.triggerSmoothedGrab() ? INTERSECT_COLOR : NO_INTERSECT_COLOR);
|
||||||
var startBeam = Vec3.sum(handPosition, Vec3.multiply(Vec3.subtract(searchSphereLocation, handPosition), OVERLAY_BEAM_SETBACK));
|
|
||||||
this.overlayLineOn(startBeam, searchSphereLocation, this.triggerSmoothedGrab() ? INTERSECT_COLOR : NO_INTERSECT_COLOR);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
Loading…
Reference in a new issue