mirror of
https://github.com/overte-org/overte.git
synced 2025-04-20 13:03:55 +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 directionBacked = Vec3.multiply(directionNormalized, PICK_BACKOFF_DISTANCE);
|
||||
var pickRayBacked = {
|
||||
origin: Vec3.subtract(pickRay.origin, directionBacked),
|
||||
direction: pickRay.direction
|
||||
};
|
||||
|
||||
var intersection;
|
||||
if (USE_BLACKLIST === true && blacklist.length !== 0) {
|
||||
intersection = findRayIntersection(pickRayBacked, true, [], blacklist);
|
||||
intersection = findRayIntersection(pickRay, true, [], blacklist);
|
||||
} else {
|
||||
intersection = findRayIntersection(pickRayBacked, true);
|
||||
intersection = findRayIntersection(pickRay, true);
|
||||
}
|
||||
|
||||
if (intersection.intersects) {
|
||||
|
|
Loading…
Reference in a new issue