Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
51 changes: 51 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,54 @@
# 1.1.0

## Detached Arms

You can now detach your arms from your body, giving you more control over your aim, not being constrained by the maximum length of the Semibot's arms anymore. You can change this setting at any time, no restarts or rejoins needed.

## Eye Tracking

RepoXR v1.1.0 adds support for eye tracking (for the three people that have it).

#### Singleplayer

Players that use eye tracking will have enhanced immersion when it comes to "looking at" things. A few of the enemies in R.E.P.O. behave differently depending on if you're looking at them or not. This detection now factors in where you are looking with your eyes!

Discovering valuables, or your lost friends' heads will also make use of eye tracking. Just look at the items and the game will discover them without you having to move your head.

#### Multiplayer

When playing with other people, other people will see your pupils move based on your real eye movement. Looking down? People will see you look down. Looking straight through your friend's soul because they broke something? Yup, they'll see that!

#### Configuration

Eye tracking can be enabled and disabled mid-game, there's no need to restart. If your headset does not support eye tracking, it will be considered disabled (even when eye tracking is enabled in the config), so no need to change the settings if you don't have eye tracking.

## Hotswap

You can now swap between VR mode and flatscreen mode by pressing the F8 button on your keyboard while you are in the main menu or in the lobby menu. This works even when you are the host (though the lobby will reload for everybody).

**Additions**:
- Added eye tracking support
- Added an option to detach arms from body
- Added support for the new climbing mechanic
- Added support for spectating your death head
- Added support for the monster update
- Added hotswapping in the main menu (F8)

**Changes**:
- The ceiling eye now darkens the world except for where the eye is (no more cheating hihi)
- Removed the performance tab and replaced it with UI in the settings
- Replaced the valuable discover overlay with a new 3D graphic (supports custom colors)
- You now look at the enemy/object that killed you while the death animation plays (if possible)
- Slightly optimized the custom camera by adding a frame rate limiter (disabled by default)
- Optimized framerate by forcibly disabling ambient occlusion (20%-40% less render time)
- Renamed "Dynamic Smooth Speed" to "Analog Smooth Turn"
- Changed the minimum possible HUD height value to account for detached hands
- The map tool can now also be grabbed from behind your head (near the shoulders)
- You can now unbind controls at your leisure

**Removals**:
- Removed support for REPO v0.2.x

# 1.0.3

**Additions**:
Expand Down
2 changes: 1 addition & 1 deletion Preload/RepoXR.Preload.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
<TargetFramework>netstandard2.1</TargetFramework>
<Description>RepoXR Preloader</Description>
<Authors>DaXcess</Authors>
<Version>1.0.3</Version>
<Version>1.1.0</Version>
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>
<LangVersion>latest</LangVersion>
<Title>RepoXR.Preload</Title>
Expand Down
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@ Here is a list of RepoXR versions and which version(s) of R.E.P.O. it supports

| RepoXR | R.E.P.O. Version |
|--------|------------------|
| v1.1.0 | v0.3.0 |
| v1.0.3 | v0.2.1 |
| v1.0.2 | v0.2.1 |
| v1.0.1 | v0.2.1 |
Expand Down
9 changes: 5 additions & 4 deletions RepoXR.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

<PropertyGroup>
<Description>Collecting Valuables in VR</Description>
<Version>1.0.3</Version>
<Version>1.1.0</Version>
<Authors>DaXcess</Authors>
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>
<LangVersion>latest</LangVersion>
Expand All @@ -28,13 +28,14 @@
</PropertyGroup>

<ItemGroup>
<PackageReference Include="BepInEx.Analyzers" Version="1.*" PrivateAssets="all" />
<PackageReference Include="BepInEx.Analyzers" Version="1.0.8" PrivateAssets="all" />
<PackageReference Include="BepInEx.Core" Version="5.*" />
<PackageReference Include="CustomDiscoverStateLib" Version="1.0.1" />
<PackageReference Include="Facepunch.Steamworks" Version="2.3.3" />
<PackageReference Include="Newtonsoft.Json" Version="13.0.2" />
<PackageReference Include="PhotonUnityNetworking" Version="0.1.2" />
<PackageReference Include="REPO" Version="0.2.1" />
<PackageReference Include="Unity.InputSystem" Version="1.7.0" />
<PackageReference Include="REPO" Version="0.3.0" />
<PackageReference Include="Unity.InputSystem" Version="1.14.2" />
<PackageReference Include="Unity.Rendering.PostProcessing" Version="3.4.0" />
<PackageReference Include="Unity.RenderPipelines.Core" Version="14.0.11" />
<PackageReference Include="Unity.TextMeshPro" Version="3.0.6" />
Expand Down
12 changes: 12 additions & 0 deletions Source/Assets/AssetCollection.cs
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,8 @@ internal static class AssetCollection
{
private static AssetBundle assetBundle;

public static OpenXRFeaturePack OpenXRFeatures;

public static RemappableControls RemappableControls;

public static GameObject RebindHeader;
Expand All @@ -21,6 +23,8 @@ internal static class AssetCollection
public static GameObject VRTumble;
public static GameObject Keyboard;
public static GameObject ExpressionWheel;
public static GameObject ValuableDiscover;
public static GameObject FocusSphere;

public static GameObject MenuSettings;
public static GameObject MenuSettingsCategory;
Expand All @@ -47,6 +51,8 @@ internal static class AssetCollection
public static AnimationCurveData HurtHapticCurve;
public static AnimationCurveData EyeAttachHapticCurve;
public static AnimationCurveData KeyboardAnimation;

public static GameObject Cube;

public static bool LoadAssets()
{
Expand All @@ -59,6 +65,8 @@ public static bool LoadAssets()
return false;
}

OpenXRFeatures = assetBundle.LoadAsset<OpenXRFeaturePack>("OpenXRFeatures");

RemappableControls = assetBundle.LoadAsset<GameObject>("RemappableControls").GetComponent<RemappableControls>();

RebindHeader = assetBundle.LoadAsset<GameObject>("Rebind Header");
Expand All @@ -69,6 +77,8 @@ public static bool LoadAssets()
VRTumble = assetBundle.LoadAsset<GameObject>("VRTumble");
Keyboard = assetBundle.LoadAsset<GameObject>("NonNativeKeyboard");
ExpressionWheel = assetBundle.LoadAsset<GameObject>("Expression Radial");
ValuableDiscover = assetBundle.LoadAsset<GameObject>("Valuable Discover");
FocusSphere = assetBundle.LoadAsset<GameObject>("Focus Sphere");

MenuSettings = assetBundle.LoadAsset<GameObject>("VR Settings Page");
MenuSettingsCategory = assetBundle.LoadAsset<GameObject>("VR Settings Page - Category");
Expand Down Expand Up @@ -96,6 +106,8 @@ public static bool LoadAssets()
EyeAttachHapticCurve = assetBundle.LoadAsset<AnimationCurveData>("EyeAttachHapticCurve");
KeyboardAnimation = assetBundle.LoadAsset<AnimationCurveData>("KeyboardAnimation");

Cube = assetBundle.LoadAsset<GameObject>("JustACube");

if (RemappableControls?.controls == null)
{
Logger.LogError(
Expand Down
1 change: 1 addition & 0 deletions Source/Compat.cs
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ namespace RepoXR;
public static class Compat
{
public const string UnityExplorer = "com.sinai.unityexplorer";
public const string CustomDiscoverStateLib = "Kistras-CustomDiscoverStateLib";

public static bool IsLoaded(string modId)
{
Expand Down
58 changes: 37 additions & 21 deletions Source/Config.cs
Original file line number Diff line number Diff line change
Expand Up @@ -38,36 +38,39 @@ public class Config(string assemblyPath, ConfigFile file)
public ConfigEntry<bool> LeftHandDominant { get; } = file.Bind("Gameplay", nameof(LeftHandDominant), false,
"Whether to use the left or right hand as dominant hand (the hand used to pick up items)");

[ConfigDescriptor(customName: "Arms", falseText: "Attached", trueText: "Detached")]
public ConfigEntry<bool> DetachedArms { get; } = file.Bind("Gameplay", nameof(DetachedArms), false,
"Whether your arms are attached to your body, or if they are separate");

[ConfigDescriptor]
public ConfigEntry<HapticFeedbackOption> HapticFeedback { get; } =
file.Bind("Gameplay", nameof(HapticFeedback), HapticFeedbackOption.All,
new ConfigDescription(
"Controls how much haptic feedback you will experience while playing with the VR mod.",
new AcceptableValueEnum<HapticFeedbackOption>()));

[ConfigDescriptor(pointerSize: 0.01f, stepSize: 0.05f)]
public ConfigEntry<float> HUDPlaneOffset { get; } = file.Bind("Gameplay", nameof(HUDPlaneOffset), -0.45f,
new ConfigDescription("The default height offset for the HUD", new AcceptableValueRange<float>(-0.6f, 0.5f)));
[ConfigDescriptor(customName: "Eye Tracking", trueText: "Enabled", falseText: "Disabled")]
public ConfigEntry<bool> EnableEyeTracking { get; } = file.Bind("Gameplay", nameof(EnableEyeTracking), true,
"If supported by the headset, use eye tracking to move your characters pupils for other players and for checking line of sight with enemies.");

// UI configuration

[ConfigDescriptor(customName: "HUD Height", pointerSize: 0.01f, stepSize: 0.05f)]
public ConfigEntry<float> HUDPlaneOffset { get; } = file.Bind("UI", nameof(HUDPlaneOffset), -0.45f,
new ConfigDescription("The default height offset for the HUD", new AcceptableValueRange<float>(-1f, 0.5f)));

[ConfigDescriptor(pointerSize: 0.01f, stepSize: 0.05f)]
public ConfigEntry<float> HUDGazePlaneOffset { get; } = file.Bind("Gameplay", nameof(HUDGazePlaneOffset), -0.25f,
new ConfigDescription("The height offset for the HUD when looking at it", new AcceptableValueRange<float>(-0.6f, 0.5f)));
[ConfigDescriptor(customName: "HUD Secondary Height", pointerSize: 0.01f, stepSize: 0.05f)]
public ConfigEntry<float> HUDGazePlaneOffset { get; } = file.Bind("UI", nameof(HUDGazePlaneOffset), -0.25f,
new ConfigDescription("The height offset for the HUD when looking at it",
new AcceptableValueRange<float>(-1f, 0.5f)));

[ConfigDescriptor(pointerSize: 0.05f, stepSize: 0.25f)]
public ConfigEntry<float> SmoothCanvasDistance { get; } = file.Bind("Gameplay", nameof(SmoothCanvasDistance), 1.5f,
public ConfigEntry<float> SmoothCanvasDistance { get; } = file.Bind("UI", nameof(SmoothCanvasDistance), 1.5f,
new ConfigDescription("The distance that the smooth canvas should be away from the main camera",
new AcceptableValueRange<float>(1.25f, 3)));

// Performance configuration

[ConfigDescriptor(stepSize: 5f, suffix: "%")]
public ConfigEntry<int> CameraResolution { get; } = file.Bind("Performance", nameof(CameraResolution), 100,
new ConfigDescription(
"This setting configures the resolution scale of the game, lower values are more performant, but will make the game look worse.",
new AcceptableValueRange<int>(5, 200)));

// Input configuration

[ConfigDescriptor(enumDisableBar: true)]
public ConfigEntry<TurnProviderOption> TurnProvider { get; } = file.Bind("Input", nameof(TurnProvider),
TurnProviderOption.Smooth,
Expand All @@ -81,7 +84,7 @@ public class Config(string assemblyPath, ConfigFile file)
new AcceptableValueRange<float>(0.25f, 5)));

[ConfigDescriptor]
public ConfigEntry<bool> DynamicSmoothSpeed { get; } = file.Bind("Input", nameof(DynamicSmoothSpeed), true,
public ConfigEntry<bool> AnalogSmoothTurn { get; } = file.Bind("Input", nameof(AnalogSmoothTurn), true,
"When enabled, makes the speed of the smooth turning dependent on how far the analog stick is pushed.");

[ConfigDescriptor(stepSize: 5, suffix: "°")]
Expand All @@ -92,6 +95,12 @@ public class Config(string assemblyPath, ConfigFile file)

// Rendering configuration

[ConfigDescriptor(stepSize: 5f, suffix: "%")]
public ConfigEntry<int> CameraResolution { get; } = file.Bind("Rendering", nameof(CameraResolution), 100,
new ConfigDescription(
"This setting configures the resolution scale of the game, lower values are more performant, but will make the game look worse.",
new AcceptableValueRange<int>(5, 200)));

[ConfigDescriptor]
public ConfigEntry<bool> Vignette { get; } = file.Bind("Rendering", nameof(Vignette), true,
"Enables the vignette shader used in certain scenarios and levels in the game.");
Expand All @@ -101,6 +110,13 @@ public class Config(string assemblyPath, ConfigFile file)
file.Bind("Rendering", nameof(CustomCamera), false,
"Adds a second camera mounted on top of the VR camera that will render separately from the VR camera to the display. This requires extra GPU power!");

[ConfigDescriptor(stepSize: 15, pointerSize: 5)]
public ConfigEntry<float> CustomCameraFramerate { get; } = file.Bind("Rendering", nameof(CustomCameraFramerate),
144f,
new ConfigDescription(
"The maximum frequency that the custom camera can render at. The custom camera framerate is limited to the VR headset's refresh rate, so setting this higher won't have any effect.",
new AcceptableValueRange<float>(15, 144)));

[ConfigDescriptor(stepSize: 5)]
public ConfigEntry<float> CustomCameraFOV { get; } = file.Bind("Rendering", nameof(CustomCameraFOV), 75f,
new ConfigDescription("The field of view that the custom camera should have.",
Expand All @@ -124,22 +140,22 @@ public class Config(string assemblyPath, ConfigFile file)
"FOR INTERNAL USE ONLY, DO NOT EDIT");

private static bool leftHandedWarningShown;

/// <summary>
/// Create persistent callbacks that persist for the entire duration of the application
/// </summary>
public void SetupGlobalCallbacks()
{
if (!VRSession.InVR)
return;

CameraResolution.SettingChanged += (_, _) =>
{
XRSettings.eyeTextureResolutionScale = CameraResolution.Value / 100f;
};

CustomCamera.SettingChanged += (_, _) =>
{
if (!VRSession.InVR)
return;

if (CustomCamera.Value)
Object.Instantiate(AssetCollection.CustomCamera, Camera.main!.transform.parent);
else
Expand Down
12 changes: 12 additions & 0 deletions Source/Data/OpenXRFeaturePack.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
using System.Collections.Generic;
using UnityEngine;
using UnityEngine.XR.OpenXR.Features;

namespace RepoXR.Data;

public class OpenXRFeaturePack : ScriptableObject
{
[SerializeReference] private List<OpenXRFeature> features = [];

public IReadOnlyList<OpenXRFeature> Features => features;
}
Loading