Fix for tablet grabbing at small scales

This commit is contained in:
Anthony J. Thibault 2017-09-07 15:10:15 -07:00
parent d11a749365
commit d0f9a20a01
2 changed files with 2 additions and 1 deletions

View file

@ -1045,6 +1045,7 @@ QVector<QUuid> Overlays::findOverlays(const glm::vec3& center, float radius) {
AABox overlayFrameBox(low, dimensions);
Transform overlayToWorldMatrix = overlay->getTransform();
overlayToWorldMatrix.setScale(1.0f); // ignore inherited scale factor from parents
glm::mat4 worldToOverlayMatrix = glm::inverse(overlayToWorldMatrix.getMatrix());
glm::vec3 overlayFrameSearchPosition = glm::vec3(worldToOverlayMatrix * glm::vec4(center, 1.0f));
glm::vec3 penetration;

View file

@ -2246,7 +2246,7 @@ function MyController(hand) {
}
}
var sensorScaleFactor = MyAvatar.sensorToWorldMatrix
var sensorScaleFactor = MyAvatar.sensorToWorldScale;
var candidateEntities = Entities.findEntities(handPosition, NEAR_GRAB_RADIUS * sensorScaleFactor);
var grabbableEntities = candidateEntities.filter(function(entity) {
return _this.entityIsNearGrabbable(entity, handPosition, NEAR_GRAB_MAX_DISTANCE * sensorScaleFactor);