mirror of
https://github.com/overte-org/overte.git
synced 2025-04-20 03:44:02 +02:00
Fix for tablet grabbing at small scales
This commit is contained in:
parent
d11a749365
commit
d0f9a20a01
2 changed files with 2 additions and 1 deletions
|
@ -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;
|
||||
|
|
|
@ -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);
|
||||
|
|
Loading…
Reference in a new issue