Skip to content

Commit

Permalink
feat(player): add player hands
Browse files Browse the repository at this point in the history
  • Loading branch information
Xenira committed Dec 3, 2023
1 parent 9478182 commit 0897dca
Show file tree
Hide file tree
Showing 72 changed files with 2,557 additions and 44 deletions.
2 changes: 1 addition & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
/plugin/obj/
/plugin/bin/
/libs/
# /libs/
/strip-dll/
20 changes: 10 additions & 10 deletions README.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -36,29 +36,29 @@ This will be improved in the future.
While the mod is in a playable state, it is still in early development. Some features are still missing and there are some known issues. Other things might be a little yanky or not work as expected.

=== Working
- Rendering of the game world with 6DOF Tracking
- Tracking of the player's head and hands
- Movement
- Basic controller bindings (Although they might not be optimal)
- Controller haptics
- :earth_americas: Rendering of the game world with 6DOF Tracking
- :raised_hands: Tracking of the player's head and hands
- :walking: Movement
- :gamepad: Basic controller bindings (Although they might not be optimal)
- :vibration_mode: Controller haptics
- :arrows_counterclockwise: Smooth turning

=== Missing
- Gesture support (e.g. Mining using pickaxe motion)
- Gesture support (e.g. Mining =1using pickaxe motion)
- Comfort options (e.g. Teleportation). Smooth locomotion and turning only for now.
- Model for the player's body and hands
- Model for the player's body. Currently not a priority as this requires IK.
- Default bindings for VR controllers other than the Valve Index Controllers
- Configuration options
- Object outlines. Disabled for now as the shader is broken in VR.

=== Known Issues
- Object outlines are not rendered correctly when hovering over them.
- Main menu is not rendered correctly. Use the Flatscreen version to start the game and then switch to VR.
- Loading screens are not rendered correctly. Use the Flatscreen version to start the game and then switch to VR.
- The players position is not synced correctly with the game when using roomscale. The characters position is in the center of the playspace. This might cause issues with collisions and other things.
- Some UI elements might be outside of the players field of view or scaled incorrectly.
- Button prompts are not for VR controllers.
- Targeting is bound to the player's head.
- Haptics are played on both controllers by the game. One improvement would be to play them on the hand that is actually holding the tool.
- When gathering it goes into auto mode and won't stop until you mine something.
- Performance needs improvement

=== Cool stuff to try
- Enable ik (The game ships with `FinalIK` so it should be possible. Probably just not networked yet.)
Expand Down
2 changes: 1 addition & 1 deletion build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ mkdir -p libs/Managed
cp -r unity/build/unity_Data/Plugins libs
cp -r unity/build/unity_Data/StreamingAssets libs
cp -r unity/build/unity_Data/UnitySubsystems libs
cp -r unity/build/unity_Data/Managed/{SteamVR*,Unity.XR.*,UnityEngine.XR*,UnityEngine.VR*,Valve*,UnityEngine.dll,UnityEngine.CoreModule.dll,UnityEngine.SubsystemsModule.dll,UnityEngine.AssetBundleModule.dll} libs/Managed
cp -r unity/build/unity_Data/Managed/{SteamVR*.dll,Unity.XR.*.dll,UnityEngine.XR*.dll,UnityEngine.VR*.dll,Valve*.dll,UnityEngine.SubsystemsModule.dll,UnityEngine.AssetBundleModule.dll} libs/Managed

# Build the project
echo "Building the project..."
Expand Down
Binary file added libs/Managed/SteamVR.dll
Binary file not shown.
Binary file added libs/Managed/SteamVR_Actions.dll
Binary file not shown.
Binary file added libs/Managed/Unity.XR.Management.dll
Binary file not shown.
Binary file added libs/Managed/Unity.XR.OpenVR.dll
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file added libs/Managed/Unity.XR.OpenXR.dll
Binary file not shown.
Binary file added libs/Managed/UnityEngine.AssetBundleModule.dll
Binary file not shown.
Binary file added libs/Managed/UnityEngine.SubsystemsModule.dll
Binary file not shown.
Binary file added libs/Managed/UnityEngine.VRModule.dll
Binary file not shown.
Binary file not shown.
Binary file added libs/Managed/UnityEngine.XRModule.dll
Binary file not shown.
Binary file added libs/Managed/Valve.Newtonsoft.Json.dll
Binary file not shown.
Binary file added libs/Plugins/x86_64/UnityOpenXR.dll
Binary file not shown.
Binary file added libs/Plugins/x86_64/XRSDKOpenVR.dll
Binary file not shown.
Binary file added libs/Plugins/x86_64/openvr_api.dll
Binary file not shown.
Binary file added libs/Plugins/x86_64/openxr_loader.dll
Binary file not shown.
Binary file added libs/Plugins/x86_64/ucrtbased.dll
Binary file not shown.
23 changes: 23 additions & 0 deletions libs/StreamingAssets/SteamVR/OpenVRSettings.asset
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
%YAML 1.1
%TAG !u! tag:unity3d.com,2011:
--- !u!114 &11400000
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 0}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: 7a32bfe54d957ec4581fa4a630f1647a, type: 3}
m_Name: Open VR Settings
m_EditorClassIdentifier:
PromptToUpgradePackage: 1
PromptToUpgradePreviewPackages: 1
SkipPromptForVersion:
StereoRenderingMode: 0
InitializationType: 1
EditorAppKey: application.generated.unity.unity.exe
ActionManifestFileRelativeFilePath: StreamingAssets\SteamVR\actions.json
MirrorView: 2
HasCopiedDefaults: 0
267 changes: 267 additions & 0 deletions libs/StreamingAssets/SteamVR/actions.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,267 @@
{
"actions": [
{
"name": "/actions/default/in/GrabPinch",
"type": "boolean"
},
{
"name": "/actions/default/in/GrabGrip",
"type": "boolean"
},
{
"name": "/actions/default/in/PoseLeft",
"type": "pose"
},
{
"name": "/actions/default/in/SkeletonLeftHand",
"type": "skeleton",
"skeleton": "/skeleton/hand/left",
"requirement": "mandatory"
},
{
"name": "/actions/default/in/SkeletonRightHand",
"type": "skeleton",
"skeleton": "/skeleton/hand/right",
"requirement": "mandatory"
},
{
"name": "/actions/default/in/Squeeze",
"type": "vector1",
"requirement": "optional"
},
{
"name": "/actions/default/in/HeadsetOnHead",
"type": "boolean",
"requirement": "optional"
},
{
"name": "/actions/default/in/SnapTurnLeft",
"type": "boolean",
"requirement": "suggested"
},
{
"name": "/actions/default/in/SnapTurnRight",
"type": "boolean"
},
{
"name": "/actions/default/in/PoseRight",
"type": "pose"
},
{
"name": "/actions/default/in/Move",
"type": "vector2"
},
{
"name": "/actions/default/in/SmoothTurn",
"type": "vector2"
},
{
"name": "/actions/default/in/Sprint",
"type": "boolean"
},
{
"name": "/actions/default/in/Interact",
"type": "boolean"
},
{
"name": "/actions/default/in/TechTree",
"type": "boolean"
},
{
"name": "/actions/default/in/Inventory",
"type": "boolean",
"requirement": "optional"
},
{
"name": "/actions/default/in/Jump",
"type": "boolean"
},
{
"name": "/actions/default/in/TakeAll",
"type": "boolean"
},
{
"name": "/actions/default/in/RotateBuildingLeft",
"type": "boolean"
},
{
"name": "/actions/default/in/RotoateBuildingRight",
"type": "boolean"
},
{
"name": "/actions/default/in/CycleHotbarLeft",
"type": "boolean"
},
{
"name": "/actions/default/in/CycleHotbarRight",
"type": "boolean"
},
{
"name": "/actions/default/in/MenuJoystickSecondary",
"type": "vector2"
},
{
"name": "/actions/default/in/MenuJoystickPrimary",
"type": "vector2"
},
{
"name": "/actions/default/in/Craft",
"type": "boolean",
"requirement": "suggested"
},
{
"name": "/actions/default/in/CraftFive",
"type": "boolean"
},
{
"name": "/actions/default/in/CraftAll",
"type": "boolean"
},
{
"name": "/actions/default/in/Transfer",
"type": "boolean"
},
{
"name": "/actions/default/in/TransferHalf",
"type": "boolean"
},
{
"name": "/actions/default/in/TransferAll",
"type": "boolean"
},
{
"name": "/actions/default/in/UIPageLeft",
"type": "boolean"
},
{
"name": "/actions/default/in/UIPageRight",
"type": "boolean"
},
{
"name": "/actions/default/in/UIPageRightSecondary",
"type": "boolean"
},
{
"name": "/actions/default/in/UIPageLeftSecondary",
"type": "boolean"
},
{
"name": "/actions/default/in/ToggleMenu",
"type": "boolean"
},
{
"name": "/actions/default/in/UISubmit",
"type": "boolean"
},
{
"name": "/actions/default/in/UICancel",
"type": "boolean"
},
{
"name": "/actions/default/out/Haptic",
"type": "vibration"
}
],
"action_sets": [
{
"name": "/actions/default",
"usage": "leftright"
}
],
"default_bindings": [
{
"controller_type": "vive_controller",
"binding_url": "bindings_vive_controller.json"
},
{
"controller_type": "oculus_touch",
"binding_url": "bindings_oculus_touch.json"
},
{
"controller_type": "knuckles",
"binding_url": "bindings_knuckles.json"
},
{
"controller_type": "holographic_controller",
"binding_url": "bindings_holographic_controller.json"
},
{
"controller_type": "vive_cosmos_controller",
"binding_url": "bindings_vive_cosmos_controller.json"
},
{
"controller_type": "logitech_stylus",
"binding_url": "bindings_logitech_stylus.json"
},
{
"controller_type": "vive_cosmos",
"binding_url": "binding_vive_cosmos.json"
},
{
"controller_type": "vive",
"binding_url": "binding_vive.json"
},
{
"controller_type": "indexhmd",
"binding_url": "binding_index_hmd.json"
},
{
"controller_type": "vive_pro",
"binding_url": "binding_vive_pro.json"
},
{
"controller_type": "rift",
"binding_url": "binding_rift.json"
},
{
"controller_type": "holographic_hmd",
"binding_url": "binding_holographic_hmd.json"
},
{
"controller_type": "vive_tracker_camera",
"binding_url": "binding_vive_tracker_camera.json"
}
],
"localization": [
{
"language_tag": "en_US",
"/actions/default/in/GrabGrip": "Grab Grip",
"/actions/default/in/GrabPinch": "Grab Pinch",
"/actions/default/in/HeadsetOnHead": "Headset on head (proximity sensor)",
"/actions/default/in/SkeletonLeftHand": "Skeleton (Left)",
"/actions/default/in/SkeletonRightHand": "Skeleton (Right)",
"/actions/default/out/Haptic": "Haptic",
"/actions/default/in/SnapTurnLeft": "Snap Turn (Left)",
"/actions/default/in/SnapTurnRight": "Snap Turn (Right)",
"/actions/default/in/PoseLeft": "PoseLeft",
"/actions/default/in/PoseRight": "Pose Right",
"/actions/default/in/Move": "Joystick Move",
"/actions/default/in/SmoothTurn": "Smooth Turn",
"/actions/default/in/Sprint": "Sprint",
"/actions/default/in/Interact": "Interact",
"/actions/default/in/TechTree": "Tech Tree",
"/actions/default/in/Inventory": "Inventory",
"/actions/default/in/Jump": "Jump",
"/actions/default/in/TakeAll": "Take All Items",
"/actions/default/in/RotateBuildingLeft": "Rotate Building Left",
"/actions/default/in/RotoateBuildingRight": "Rotate Building Right",
"/actions/default/in/CycleHotbarLeft": "Cycle Hotbar Left",
"/actions/default/in/CycleHotbarRight": "Cycle Hotbar Right",
"/actions/default/in/Craft": "Craft",
"/actions/default/in/CraftFive": "Craft Five",
"/actions/default/in/CraftAll": "Craft All",
"/actions/default/in/Transfer": "Transfer",
"/actions/default/in/TransferHalf": "Transfer Half",
"/actions/default/in/TransferAll": "Transfer All",
"/actions/default/in/UIPageLeft": "UI Page Left",
"/actions/default/in/UIPageRight": "UI Page Right",
"/actions/default/in/MenuJoystickSecondary": "Menu Joystick Secondary",
"/actions/default/in/MenuJoystickPrimary": "Menu Joystick Primary",
"/actions/default/in/UIPageRightSecondary": "UI Page Right Secondary",
"/actions/default/in/UIPageLeftSecondary": "UI Page Left Secondary",
"/actions/default/in/ToggleMenu": "ToggleMenu",
"/actions/default/in/UISubmit": "UI Submit",
"/actions/default/in/UICancel": "UI Cancel"
}
]
}
27 changes: 27 additions & 0 deletions libs/StreamingAssets/SteamVR/binding_holographic_hmd.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
{
"alias_info" : {},
"bindings" : {
"/actions/default" : {
"chords" : [],
"haptics" : [],
"poses" : [],
"skeleton" : [],
"sources" : [
{
"inputs" : {
"click" : {
"output" : "/actions/default/in/headsetonhead"
}
},
"mode" : "button",
"path" : "/user/head/proximity"
}
]
}
},
"controller_type" : "holographic_hmd",
"description" : "",
"name" : "holographic_hmd defaults",
"options" : {},
"simulated_actions" : []
}
Loading

0 comments on commit 0897dca

Please sign in to comment.