Skip to content

Commit

Permalink
feat(input): add laserpointer interaction (#54)
Browse files Browse the repository at this point in the history
* feat(input): add laserpointer select for toolbar

* feat(input): add drag'n'drop for toolbar

* feat(ui): move ui to world space canvases

* feat(input): add inventory interactable ui

* feat(input): allow drop from inventory to hotbar

* fix(ui): switch to inventory on hover

BREAKING CHANGE: Mod config might need to be deleted after updating, as ui scale changed
  • Loading branch information
Xenira authored Jan 12, 2024
1 parent ab3e330 commit 1b8723c
Show file tree
Hide file tree
Showing 50 changed files with 3,528 additions and 2,013 deletions.
1 change: 1 addition & 0 deletions .github/FUNDING.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
liberapay: rip3.141
9 changes: 6 additions & 3 deletions .github/workflows/dotnet.yml
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,10 @@ jobs:
uses: actions/upload-artifact@v3
with:
name: plugin
path: ./plugin/bin/Release/netstandard2.1/techtonica_vr.dll
path: |
./plugin/bin/Release/netstandard2.1/techtonica_vr.dll
./plugin/bin/Release/netstandard2.1/techtonica_vr.pdb
if-no-files-found: error

package:
runs-on: ubuntu-latest
Expand All @@ -58,12 +61,12 @@ jobs:
- name: Copy Files
run: |
mkdir -p ./artifact/BepInEx/plugins/techtonica_vr/assets && mkdir -p ./artifact/Techtonica_Data
cp techtonica_vr.dll ./artifact/BepInEx/plugins
cp techtonica_vr.* ./artifact/BepInEx/plugins
cp -r ./libs/* ./artifact/Techtonica_Data/
cp -r ./unity/AssetBundles/StandaloneWindows/* ./artifact/BepInEx/plugins/techtonica_vr/assets
cp {README.adoc,CHANGELOG.md,LICENSE,manifest.json,icon.png} ./artifact/
- name: Upload Release Asset Artifact
uses: actions/upload-artifact@v2
uses: actions/upload-artifact@v3
with:
name: release-artifact
path: artifact
Expand Down
21 changes: 14 additions & 7 deletions README.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -18,13 +18,15 @@ endif::[]
:game-version: 0.2.0h
:repo: Xenira/TechtonicaVR

image:https://img.shields.io/github/v/release/{repo}[GitHub release (with filter)]
image:https://img.shields.io/github/release-date/{repo}[GitHub Release Date - Published_At]
image:https://img.shields.io/github/downloads/{repo}/total[GitHub downloads all releases]
image:https://img.shields.io/github/v/release/{repo}["GitHub release (with filter)", link="https://github.com/{repo}/releases/latest"]
image:https://img.shields.io/github/release-date/{repo}["GitHub Release Date - Published_At", link="https://github.com/{repo}/releases/latest"]
image:https://img.shields.io/thunderstore/dt/3_141/TechtonicaVR?label=thunderstore.io&color=1d6fa5["Thunderstore.io", link="https://thunderstore.io/c/techtonica/p/3_141/TechtonicaVR/"]
image:https://img.shields.io/github/downloads/{repo}/total?label=github%20downloads["GitHub downloads all releases", link="https://github.com/{repo}/releases"]
image:https://img.shields.io/liberapay/patrons/rip3.141.svg?logo=liberapay["LiberaPay Patrons", link="https://liberapay.com/rip3.141/"]
image:https://img.shields.io/github/actions/workflow/status/{repo}/dotnet.yml[GitHub Workflow Status (with event)]
image:https://img.shields.io/github/issues/{repo}[GitHub issues]
image:https://img.shields.io/github/issues-pr/{repo}[GitHub pull requests]
image:https://img.shields.io/github/license/{repo}[License]
image:https://img.shields.io/github/issues/{repo}["GitHub issues", link="https://github.com/{repo}/issues"]
image:https://img.shields.io/github/issues-pr/{repo}["GitHub pull requests", link="https://github.com/{repo}/pulls"]
image:https://img.shields.io/github/license/{repo}["License", link="https://github.com/{repo}/blob/master/LICENSE"]

++++
<p align="center">
Expand Down Expand Up @@ -69,7 +71,7 @@ Teleport and Snap turn have audio cues that are not played unless https://github
- The GitHub release of the VR mod includes the audio fix so you don't need to install it separately.
- The thunderstore release does not include the audio fix unless you install it using a mod manager that installs dependencies.

To install the UnityAudio extract the `BepInEx` folder from the downloaded archive into the game's installation directory.
To manually install the UnityAudio extract the `BepInEx` folder from the downloaded archive into the game's installation directory.

=== Disabling the Mod
To disable the mod change the `Enabled` under `[General]` value in the `de.xenira.techtonica.cfg` file in the `BepInEx/config` folder to `false`.
Expand Down Expand Up @@ -129,9 +131,11 @@ To reset only a specific section, delete the section from the configuration file
[horizontal]
.General
Enabed:: Enables or disables the mod. Default: `true`

[horizontal]
.Input
Smooth Turn Speed:: Speed of smooth turning. Default: `90`

[horizontal]
.Comfort
Snap Turn Angle:: Angle of snap turns. Default: `30`
Expand All @@ -144,15 +148,18 @@ Vignette Color:: Color of the vignette. Default: `000000FF` Black
Vignette Intensity:: Intensity of the vignette. Determines how far the vignette will close. Default: `0.5`
Vignette Smoothness:: Adds a blur to the vignette edge. 0 is sharp edge, 1 is prob. unusable. Default: `0.15`
Vignette Fade Speed:: Animation speed of the vignette. Higher is faster. Default: `3`

[horizontal]
.Buttons
Long Press Time:: Time in seconds before a button press is considered a long press. Default: `1`

[horizontal]
.UI
Menu Spawn Distance:: Distance of the menu from the player. Default: `0.8`
Menu Scale:: Scale of the menu (X/Y/Z). Default: `{"x":0.2,"y":0.2,"z":0.2}`
Inventory and Crafting Menu Scale Override:: Scale of the inventory and crafting menu (X/Y/Z). This menu has different scaling and needs separate config. Default: `{"x":0.2,"y":0.1,"z":0.2}`
Menu Downward Offset:: Offset of the menu in the downward direction. Default: `0.2`

[horizontal]
.Debug
Debug Mode:: Mostly used for development. Default: `false`
Expand Down
2 changes: 1 addition & 1 deletion build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ cd ..

# Copy the mod dll to the mods folder
echo "Copying the mod dll to the mods folder..."
cp ./plugin/bin/Debug/netstandard2.1/techtonica_vr.dll /c/Program\ Files\ \(x86\)/Steam/steamapps/common/Techtonica/BepInEx/plugins/techtonica_vr.*
cp ./plugin/bin/Debug/netstandard2.1/techtonica_vr.* /c/Program\ Files\ \(x86\)/Steam/steamapps/common/Techtonica/BepInEx/plugins/

# Copy the vr dlls to the game folder
echo "Copying the vr dlls to the game folder..."
Expand Down
Binary file modified libs/Managed/SteamVR_Actions.dll
Binary file not shown.
11 changes: 10 additions & 1 deletion libs/StreamingAssets/SteamVR/actions.json
Original file line number Diff line number Diff line change
Expand Up @@ -208,12 +208,20 @@
{
"name": "/actions/default/out/Haptic",
"type": "vibration"
},
{
"name": "/actions/UI/in/Click",
"type": "boolean"
}
],
"action_sets": [
{
"name": "/actions/default",
"usage": "leftright"
},
{
"name": "/actions/UI",
"usage": "leftright"
}
],
"default_bindings": [
Expand Down Expand Up @@ -321,7 +329,8 @@
"/actions/default/in/HotbarSwap": "Swap Hotbar Item",
"/actions/default/in/Teleport": "Teleport",
"/actions/default/in/SonarZoomIn": "Map Zoom In",
"/actions/default/in/SonarZoomOut": "Map Zoom Out"
"/actions/default/in/SonarZoomOut": "Map Zoom Out",
"/actions/UI/in/Click": "Click"
}
]
}
Loading

0 comments on commit 1b8723c

Please sign in to comment.