Introduce 'View ratchetting', cleanup/improve vestibular motion (#510)
* vestibular motion cleanup * Fix environment jumping when autoturn is enabled * Restrict vestibular motion to forward movement * Revert "vestibular motion cleanup" This reverts commit 3d6b293ad2d6a0df41756c67f7e80c4b2be8b6fd. * Experimental: dynamic redirection. very subtle effect * formatting... * swap centidegrees for millidegrees * Experimental: introduce view ratchetting * more cleanup * Revert "Experimental: dynamic redirection. very subtle effect" This reverts commit d6c8e5cdedf1b11013f25340c2e9be64ec1359b8. * vestibular motion cleanup * view ratchetting settings * cleanup and formatting * Resolve drift, improve accuracy of vestibular motion/autoturn * updated UI first pass * UI first pass * Hide Unset Errors After encountering one * fix synch issue add ratchet box * moved view ratchet ui to own file * minor format changes to fit * fixed REALLY 3% minimum * fixed vestib motion default Co-authored-by: ykeara <ykeara1@gmail.com>
This commit is contained in:
@@ -6,13 +6,14 @@ import "../common"
|
||||
import "redirected"
|
||||
import "space_turn"
|
||||
import "snap_turn"
|
||||
import "view_ratchet"
|
||||
|
||||
|
||||
MyStackViewPage {
|
||||
width: 1200
|
||||
headerText: "Rotation Settings"
|
||||
content: ColumnLayout {
|
||||
spacing: 10
|
||||
spacing: 8
|
||||
AutoTurnGroupBox{
|
||||
id: autoTurnGroupBox
|
||||
}
|
||||
@@ -20,7 +21,9 @@ MyStackViewPage {
|
||||
RedirectedGroupBox{
|
||||
id: redirectedGroupBox
|
||||
}
|
||||
|
||||
ViewRatchetGroupBox{
|
||||
id: vgiiewRatchetGroupBox
|
||||
}
|
||||
SpaceTurnGroupBox{
|
||||
id:spaceTurnGroupBox
|
||||
}
|
||||
|
||||
@@ -11,7 +11,7 @@ GroupBox {
|
||||
label: MyText {
|
||||
leftPadding: 10
|
||||
text: "Auto-Turn (for discrete redirected walking)"
|
||||
bottomPadding: -10
|
||||
bottomPadding: -12
|
||||
}
|
||||
background: Rectangle {
|
||||
color: "transparent"
|
||||
@@ -26,7 +26,7 @@ GroupBox {
|
||||
color: "#ffffff"
|
||||
height: 1
|
||||
Layout.fillWidth: true
|
||||
Layout.bottomMargin: 5
|
||||
Layout.bottomMargin: 3
|
||||
}
|
||||
|
||||
RowLayout {
|
||||
|
||||
@@ -11,7 +11,7 @@ GroupBox {
|
||||
label: MyText {
|
||||
leftPadding: 10
|
||||
text: "Vestibular Motion (for continuous redirected walking)"
|
||||
bottomPadding: -10
|
||||
bottomPadding: -12
|
||||
}
|
||||
background: Rectangle {
|
||||
color: "transparent"
|
||||
@@ -26,13 +26,13 @@ GroupBox {
|
||||
color: "#ffffff"
|
||||
height: 1
|
||||
Layout.fillWidth: true
|
||||
Layout.bottomMargin: 5
|
||||
Layout.bottomMargin: 3
|
||||
}
|
||||
|
||||
RowLayout{
|
||||
MyToggleButton {
|
||||
id: redirectedModeToggle
|
||||
text: "On"
|
||||
text: "Toggle On/Off"
|
||||
Layout.preferredWidth: 225
|
||||
onCheckedChanged: {
|
||||
RotationTabController.setVestibularMotionEnabled(this.checked, true);
|
||||
@@ -106,6 +106,7 @@ GroupBox {
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Component.onCompleted: {
|
||||
redirectedWalkingRadiusText.text = ((RotationTabController.vestibularMotionRadius).toFixed(2))
|
||||
redirectedModeToggle.checked = RotationTabController.vestibularMotionEnabled
|
||||
|
||||
@@ -11,7 +11,7 @@ GroupBox {
|
||||
label: MyText {
|
||||
leftPadding: 10
|
||||
text: "Space Turn (for manual redirected walking)"
|
||||
bottomPadding: -10
|
||||
bottomPadding: -12
|
||||
}
|
||||
background: Rectangle {
|
||||
color: "transparent"
|
||||
@@ -26,7 +26,7 @@ GroupBox {
|
||||
color: "#ffffff"
|
||||
height: 1
|
||||
Layout.fillWidth: true
|
||||
Layout.bottomMargin: 5
|
||||
Layout.bottomMargin: 3
|
||||
}
|
||||
|
||||
RowLayout {
|
||||
|
||||
@@ -0,0 +1,88 @@
|
||||
import QtQuick 2.7
|
||||
import QtQuick.Controls 2.0
|
||||
import QtQuick.Layouts 1.3
|
||||
import ovras.advsettings 1.0
|
||||
import "../../common"
|
||||
|
||||
GroupBox {
|
||||
id: viewRatchetGroupBox
|
||||
Layout.fillWidth: true
|
||||
|
||||
ColumnLayout {
|
||||
anchors.fill: parent
|
||||
|
||||
RowLayout {
|
||||
Layout.fillWidth: true
|
||||
MyToggleButton{
|
||||
id: viewRatchetToggleBtn
|
||||
text: "View Ratchetting"
|
||||
Layout.preferredWidth: 275
|
||||
onCheckedChanged: {
|
||||
RotationTabController.setViewRatchettingEnabled(this.checked, true);
|
||||
}
|
||||
}
|
||||
Item{
|
||||
Layout.preferredWidth: 25
|
||||
}
|
||||
|
||||
MySlider {
|
||||
id: viewRatchetSlider
|
||||
from: 0.00
|
||||
to: 0.1
|
||||
stepSize: 0.01
|
||||
Layout.fillWidth: true
|
||||
onMoved: {
|
||||
viewRatchetText.text = this.value.toFixed(2)
|
||||
RotationTabController.setViewRatchettingPercent(this.value, true)
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
MyTextField {
|
||||
id: viewRatchetText
|
||||
text: "0.05"
|
||||
keyBoardUID: 1007
|
||||
Layout.preferredWidth: 100
|
||||
Layout.leftMargin: 10
|
||||
horizontalAlignment: Text.AlignHCenter
|
||||
function onInputEvent(input) {
|
||||
var val = parseFloat(input)
|
||||
if (!isNaN(val)) {
|
||||
if (val < 0) {
|
||||
val = 0
|
||||
} else if (val > 1) {
|
||||
val = 1
|
||||
}
|
||||
RotationTabController.setViewRatchettingPercent(val.toFixed(2), true)
|
||||
if(val > 0.1){
|
||||
viewRatchetSlider.value = 0.1
|
||||
}else{
|
||||
viewRatchetSlider.value = val
|
||||
}
|
||||
}
|
||||
text = RotationTabController.viewRatchettingPercent.toFixed(2);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Component.onCompleted: {
|
||||
viewRatchetToggleBtn.checked = RotationTabController.viewRatchettingEnabled
|
||||
var ratchetPercVal = RotationTabController.viewRatchettingPercent
|
||||
viewRatchetSlider.value = ratchetPercVal
|
||||
viewRatchetText.text = ratchetPercVal.toFixed(2)
|
||||
}
|
||||
|
||||
Connections {
|
||||
target: RotationTabController
|
||||
|
||||
onViewRatchettingEnabledChanged:{
|
||||
viewRatchetToggleBtn.checked = RotationTabController.viewRatchettingEnabled
|
||||
}
|
||||
onViewRatchettingPercentChanged:{
|
||||
var ratchetPercVal = RotationTabController.viewRatchettingPercent
|
||||
viewRatchetSlider.value = ratchetPercVal
|
||||
viewRatchetText.text = ratchetPercVal.toFixed(2)
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -56,7 +56,7 @@ GroupBox {
|
||||
stepSize: 0.01
|
||||
value: 1.0
|
||||
Layout.fillWidth: true
|
||||
onPositionChanged: {
|
||||
onMoved: {
|
||||
var val = (this.value * 100)
|
||||
brightnessValueText.text = Math.round(val) + "%"
|
||||
VideoTabController.setBrightnessOpacityValue(value.toFixed(2), true)
|
||||
@@ -80,6 +80,9 @@ GroupBox {
|
||||
}
|
||||
var v = (val/100)
|
||||
VideoTabController.setBrightnessOpacityValue(v.toFixed(2), true)
|
||||
if(v<.05){
|
||||
v = .05
|
||||
}
|
||||
brightnessSlider.value = v
|
||||
}
|
||||
text = Math.round(VideoTabController.brightnessOpacityValue * 100) + "%"
|
||||
|
||||
Reference in New Issue
Block a user