Skip to content
Merged
Show file tree
Hide file tree
Changes from 2 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
2 changes: 1 addition & 1 deletion CommunityBugFixCollection/CommunityBugFixCollection.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
<GeneratePackageOnBuild>True</GeneratePackageOnBuild>
<PackageId>CommunityBugFixCollection</PackageId>
<Title>Community Bug-Fix Collection</Title>
<Authors>Banane9; Nytra; art0007i; LeCloutPanda</Authors>
<Authors>Banane9; Nytra; art0007i; LeCloutPanda; goat; __Choco__</Authors>
<Version>0.3.0-beta</Version>
<Description>This MonkeyLoader mod for Resonite that fixes various small Resonite-issues that are still open.</Description>
<PackageReadmeFile>README.md</PackageReadmeFile>
Expand Down
1 change: 1 addition & 0 deletions CommunityBugFixCollection/Locale/de.json
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@
"CommunityBugFixCollection.NonHDRColorClamping.Description": "Korrigiert, dass die nicht-HDR Varianten der Color(X) Kanal-Additionen die Werte nicht limitieren.",
"CommunityBugFixCollection.PauseAnimatorUpdates.Description": "Verhindert, dass Animatoren jeden Frame in alle assoziierten Felder schreiben, obwohl sie nicht am animieren sind.",
"CommunityBugFixCollection.SmoothDraggables.Description": "Umgeht, dass Slider und Joints in Headless-Sessions verrutschen.",
"CommunityBugFixCollection.TiltedUIAlignment.Description": "Kippt die UI-fokussierte Kamera, um UIX-Renderprobleme zum umgehen.",
"CommunityBugFixCollection.StationaryGrabWorldActivation.Description": "Verhindert, dass die Welt-Greifen Fortbewegung den Spieler bei jeder Aktivierung bewegt.",
"CommunityBugFixCollection.UserInspectorAsNonHost.Description": "Sorgt dafür, dass Benutzer-Inspektoren bereits präsente Benutzer auch in Sessions anzeigen, in denen man nicht der Host ist."
}
Expand Down
3 changes: 2 additions & 1 deletion CommunityBugFixCollection/Locale/en.json
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,8 @@
"CommunityBugFixCollection.PauseAnimatorUpdates.Description": "Fixes animators updating all associated fields every frame while enabled but not playing.",
"CommunityBugFixCollection.SmoothDraggables.Description": "Workaround for Sliders and Joints snapping in sessions hosted by a headless.",
"CommunityBugFixCollection.StationaryGrabWorldActivation.Description": "Stops the Grab World Locomotion from moving the player with each activiation.",
"CommunityBugFixCollection.TiltedUIAlignment.Description": "Tilts the UI-Focus camera to work around UIX rendering issues.",
"CommunityBugFixCollection.UserInspectorAsNonHost.Description": "Fixes UserInspectors not listing existing users in the session for non-host users.",
"CommunityBugFixCollection.ValueModDecimal.Description": "Adds a zero check to the Decimal ValueMod ProtoFlux node to prevent DIV/0 crashes"
}
}
}
40 changes: 40 additions & 0 deletions CommunityBugFixCollection/TiltedUIAlignment.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
using Elements.Core;
using FrooxEngine;
using HarmonyLib;
using MonkeyLoader.Resonite;
using System;
using System.Collections.Generic;
using System.Text;

namespace CommunityBugFixCollection
{
[HarmonyPatchCategory(nameof(TiltedUIAlignment))]
[HarmonyPatch(typeof(UI_TargettingController), nameof(UI_TargettingController.OnBeforeHeadUpdate))]
internal sealed class TiltedUIAlignment : ResoniteMonkey<TiltedUIAlignment>
{
public override IEnumerable<string> Authors => Contributors.Banane9;

public override bool CanBeDisabled => true;

private static void Postfix(UI_TargettingController __instance)
{
if (!Enabled)
return;

var space = __instance.ViewSpace ?? __instance.Slot;
var spacePosition = space.GlobalPosition;
var rootDistance = MathX.Max(1, MathX.MaxComponent(MathX.Abs(spacePosition)));

var rotationAxis = space.Right;
var angle = MathX.Clamp(0.1f, 5, 0.01f * MathX.Sqrt(rootDistance));

// Add angle to camera to prevent flickering
var rotation = floatQ.AxisAngle(rotationAxis, angle);
__instance.ViewRotation *= rotation;

// Adjust position based on angle to frame UI properly still
var antiRotation = floatQ.AxisAngle(rotationAxis, -angle - 2f);
__instance.ViewPosition = __instance._currentCenter + (space.GlobalRotationToLocal(antiRotation) * __instance._currentPlane * __instance._currentDistance);
}
}
}
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,7 @@ just disable them in the settings in the meantime.

* Sliders and Joints snapping in sessions hosted by a headless (https://github.com/Yellow-Dog-Man/Resonite-Issues/issues/399)
* Missing Cloud Home template for Groups (fallback to User Cloud Home) (https://github.com/Yellow-Dog-Man/Resonite-Issues/issues/1144)
* UIX Rendering issues in UI-Focus mode (https://github.com/Yellow-Dog-Man/Resonite-Issues/issues/1292)


## Features
Expand Down