mirror of
https://github.com/overte-org/overte.git
synced 2025-08-07 16:50:43 +02:00
don't back up pick-ray from hand
This commit is contained in:
parent
624cc655dd
commit
b45181ea92
1 changed files with 2 additions and 6 deletions
|
@ -1202,16 +1202,12 @@ function MyController(hand) {
|
||||||
|
|
||||||
var directionNormalized = Vec3.normalize(pickRay.direction);
|
var directionNormalized = Vec3.normalize(pickRay.direction);
|
||||||
var directionBacked = Vec3.multiply(directionNormalized, PICK_BACKOFF_DISTANCE);
|
var directionBacked = Vec3.multiply(directionNormalized, PICK_BACKOFF_DISTANCE);
|
||||||
var pickRayBacked = {
|
|
||||||
origin: Vec3.subtract(pickRay.origin, directionBacked),
|
|
||||||
direction: pickRay.direction
|
|
||||||
};
|
|
||||||
|
|
||||||
var intersection;
|
var intersection;
|
||||||
if (USE_BLACKLIST === true && blacklist.length !== 0) {
|
if (USE_BLACKLIST === true && blacklist.length !== 0) {
|
||||||
intersection = findRayIntersection(pickRayBacked, true, [], blacklist);
|
intersection = findRayIntersection(pickRay, true, [], blacklist);
|
||||||
} else {
|
} else {
|
||||||
intersection = findRayIntersection(pickRayBacked, true);
|
intersection = findRayIntersection(pickRay, true);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (intersection.intersects) {
|
if (intersection.intersects) {
|
||||||
|
|
Loading…
Reference in a new issue