mirror of
https://github.com/overte-org/overte.git
synced 2025-04-08 08:14:48 +02:00
tablet scale and position changes
This commit is contained in:
parent
9595049e01
commit
2d448d7208
4 changed files with 8 additions and 7 deletions
|
@ -891,7 +891,7 @@ Q_GUI_EXPORT void qt_gl_set_global_share_context(QOpenGLContext *context);
|
|||
|
||||
Setting::Handle<int> sessionRunTime{ "sessionRunTime", 0 };
|
||||
|
||||
const float DEFAULT_HMD_TABLET_SCALE_PERCENT = 100.0f;
|
||||
const float DEFAULT_HMD_TABLET_SCALE_PERCENT = 70.0f;
|
||||
const float DEFAULT_DESKTOP_TABLET_SCALE_PERCENT = 75.0f;
|
||||
const bool DEFAULT_DESKTOP_TABLET_BECOMES_TOOLBAR = true;
|
||||
const bool DEFAULT_HMD_TABLET_BECOMES_TOOLBAR = false;
|
||||
|
|
|
@ -46,8 +46,9 @@ function calcSpawnInfo(hand, landscape) {
|
|||
|
||||
var headPos = (HMD.active && Camera.mode === "first person") ? HMD.position : Camera.position;
|
||||
var headRot = (HMD.active && Camera.mode === "first person") ? HMD.orientation : Camera.orientation;
|
||||
|
||||
var forward = Quat.getForward(Quat.cancelOutRollAndPitch(headRot));
|
||||
var dominantHandRotation = MyAvatar.getDominantHand() === "right" ? -20 : 20;
|
||||
var offsetRotation = Quat.fromPitchYawRollDegrees(0, dominantHandRotation, 0);
|
||||
var forward = Vec3.multiplyQbyV(offsetRotation, Quat.getForward(Quat.cancelOutRollAndPitch(headRot)));
|
||||
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));
|
||||
|
|
|
@ -356,7 +356,7 @@ getTabletWidthFromSettings = function () {
|
|||
var DEFAULT_TABLET_WIDTH = 0.4375;
|
||||
var tablet = Tablet.getTablet("com.highfidelity.interface.tablet.system");
|
||||
var toolbarMode = tablet.toolbarMode;
|
||||
var DEFAULT_TABLET_SCALE = 100;
|
||||
var DEFAULT_TABLET_SCALE = 70;
|
||||
var tabletScalePercentage = DEFAULT_TABLET_SCALE;
|
||||
if (!toolbarMode) {
|
||||
if (HMD.active) {
|
||||
|
@ -441,4 +441,4 @@ getMainTabletIDs = function () {
|
|||
tabletIDs.push(HMD.homeButtonID);
|
||||
}
|
||||
return tabletIDs;
|
||||
};
|
||||
};
|
||||
|
|
|
@ -19,11 +19,11 @@
|
|||
var tabletRezzed = false;
|
||||
var activeHand = null;
|
||||
var DEFAULT_WIDTH = 0.4375;
|
||||
var DEFAULT_TABLET_SCALE = 100;
|
||||
var DEFAULT_TABLET_SCALE = 70;
|
||||
var preMakeTime = Date.now();
|
||||
var validCheckTime = Date.now();
|
||||
var debugTablet = false;
|
||||
var tabletScalePercentage = 100.0;
|
||||
var tabletScalePercentage = 70.0;
|
||||
UIWebTablet = null;
|
||||
var MSECS_PER_SEC = 1000.0;
|
||||
var MUTE_MICROPHONE_MENU_ITEM = "Mute Microphone";
|
||||
|
|
Loading…
Reference in a new issue