Merge pull request #11416 from druiz17/stylus-pos

Pull back the stylus position in hand.
This commit is contained in:
Anthony Thibault 2017-09-20 17:40:22 -07:00 committed by GitHub
commit 03e278c5ae
2 changed files with 2 additions and 2 deletions

View file

@ -23,7 +23,7 @@ Script.include("/~/system/libraries/controllers.js");
var WEB_DISPLAY_STYLUS_DISTANCE = 0.5;
var WEB_STYLUS_LENGTH = 0.2;
var WEB_TOUCH_Y_OFFSET = 0.05; // how far forward (or back with a negative number) to slide stylus in hand
var WEB_TOUCH_Y_OFFSET = 0.105; // how far forward (or back with a negative number) to slide stylus in hand
function isNearStylusTarget(stylusTargets, edgeBorder, minNormalDistance, maxNormalDistance) {
for (var i = 0; i < stylusTargets.length; i++) {

View file

@ -49,7 +49,7 @@ function calcSpawnInfo(hand, landscape) {
var headRot = (HMD.active && Camera.mode === "first person") ? HMD.orientation : Camera.orientation;
var forward = Quat.getForward(headRot);
var FORWARD_OFFSET = 0.6 * MyAvatar.sensorToWorldScale;
var FORWARD_OFFSET = 0.5 * MyAvatar.sensorToWorldScale;
finalPosition = Vec3.sum(headPos, Vec3.multiply(FORWARD_OFFSET, forward));
var orientation = Quat.lookAt({x: 0, y: 0, z: 0}, forward, Vec3.multiplyQbyV(MyAvatar.orientation, Vec3.UNIT_Y));
return {