mirror of
https://github.com/overte-org/overte.git
synced 2025-04-20 12:04:18 +02:00
Squeeze a little to search, a lot to grab
This commit is contained in:
parent
23a8d57ca2
commit
9b3155188d
1 changed files with 6 additions and 6 deletions
|
@ -853,7 +853,7 @@ function MyController(hand) {
|
|||
intersection = Entities.findRayIntersection(pickRayBacked, true, [], blacklist);
|
||||
} else {
|
||||
intersection = Entities.findRayIntersection(pickRayBacked, true);
|
||||
}
|
||||
}
|
||||
|
||||
if (intersection.intersects) {
|
||||
rayPickedCandidateEntities.push(intersection.entityID);
|
||||
|
@ -900,8 +900,8 @@ function MyController(hand) {
|
|||
grabbableData = grabbableDataForCandidate;
|
||||
}
|
||||
}
|
||||
if (this.grabbedEntity !== null) {
|
||||
// We've found an entity that we'll do something with.
|
||||
if ((this.grabbedEntity !== null) && (this.triggerSmoothedGrab() || this.bumperSqueezed())) {
|
||||
// We are squeezing enough to grab, and we've found an entity that we'll try to do something with.
|
||||
var near = (nearPickedCandidateEntities.indexOf(this.grabbedEntity) >= 0);
|
||||
var isPhysical = this.propsArePhysical(props);
|
||||
|
||||
|
@ -945,7 +945,7 @@ function MyController(hand) {
|
|||
this.handleParticleBeam(distantPickRay.origin, this.getHandRotation(), NO_INTERSECT_COLOR);
|
||||
}
|
||||
|
||||
var SPHERE_INTERSECTION_SIZE = 0.011;
|
||||
var SEARCH_SPHERE_SIZE = 0.011;
|
||||
var SEARCH_SPHERE_FOLLOW_RATE = 0.50;
|
||||
|
||||
if (this.intersectionDistance > 0) {
|
||||
|
@ -954,9 +954,9 @@ function MyController(hand) {
|
|||
}
|
||||
|
||||
var searchSphereLocation = Vec3.sum(distantPickRay.origin, Vec3.multiply(distantPickRay.direction, this.searchSphereDistance));
|
||||
this.searchSphereOn(searchSphereLocation, SPHERE_INTERSECTION_SIZE * this.searchSphereDistance, this.triggerSmoothedGrab() ? INTERSECT_COLOR : NO_INTERSECT_COLOR);
|
||||
this.searchSphereOn(searchSphereLocation, SEARCH_SPHERE_SIZE * this.searchSphereDistance, (this.triggerSmoothedGrab() || this.bumperSqueezed()) ? INTERSECT_COLOR : NO_INTERSECT_COLOR);
|
||||
if ((USE_OVERLAY_LINES_FOR_SEARCHING === true) && PICK_WITH_HAND_RAY) {
|
||||
this.overlayLineOn(handPosition, searchSphereLocation, this.triggerSmoothedGrab() ? INTERSECT_COLOR : NO_INTERSECT_COLOR);
|
||||
this.overlayLineOn(handPosition, searchSphereLocation, (this.triggerSmoothedGrab() || this.bumperSqueezed()) ? INTERSECT_COLOR : NO_INTERSECT_COLOR);
|
||||
}
|
||||
};
|
||||
|
||||
|
|
Loading…
Reference in a new issue