When trigger is pulled, snap search beam to correct length instead of animating.

This improves interaction on web browser tablets. Instead of the beam shooting
through the tablet and animating back to the surface, it starts at the correct length.
This commit is contained in:
Anthony J. Thibault 2016-08-29 13:22:57 -07:00
parent 3890197efe
commit 3ed11d2e5f

View file

@ -1319,6 +1319,11 @@ function MyController(hand) {
this.searchEnter = function() {
mostRecentSearchingHand = this.hand;
var rayPickInfo = this.calcRayPickInfo(this.hand);
if (rayPickInfo.entityID || rayPickInfo.overlayID) {
this.intersectionDistance = rayPickInfo.distance;
this.searchSphereDistance = this.intersectionDistance;
}
};
this.search = function(deltaTime, timestamp) {