Skip to content
Closed
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
10 changes: 5 additions & 5 deletions Assets/Gothic-Core/Scripts/Const/Constants.cs
Original file line number Diff line number Diff line change
Expand Up @@ -110,11 +110,11 @@ public static class Animations
public static LayerMask WaterLayer = LayerMask.NameToLayer("Water");
public static LayerMask UILayer = LayerMask.NameToLayer("UI");

// HVR Layers (could also be reused and implemented for XRIT if needed)
public static LayerMask PlayerLayer = LayerMask.NameToLayer("Player"); // Layer 8 (suggested by HVR)
public static LayerMask DynamicPoseLayer = LayerMask.NameToLayer("DynamicPose"); // Layer 9 (suggested by HVR)
public static LayerMask GrabbableLayer = LayerMask.NameToLayer("Grabbable"); // Layer 20 (suggested by HVR)
public static LayerMask HandLayer = LayerMask.NameToLayer("Hand"); // Layer 21 (suggested by HVR)
// VR layers (used by the VR backend for player, hands and grabbables)
public static LayerMask PlayerLayer = LayerMask.NameToLayer("Player"); // Layer 8 (VR backend default)
public static LayerMask DynamicPoseLayer = LayerMask.NameToLayer("DynamicPose"); // Layer 9 (VR backend default)
public static LayerMask GrabbableLayer = LayerMask.NameToLayer("Grabbable"); // Layer 20 (VR backend default)
public static LayerMask HandLayer = LayerMask.NameToLayer("Hand"); // Layer 21 (VR backend default)

// Custom layers
public static LayerMask VobItemLayer = LayerMask.NameToLayer("VobItem");
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -802,7 +802,7 @@ private static void SnapDigSpotToLoader(GameObject go)

/// <summary>
/// Child vobs are created inside their parent's GO without a VobLoader of their own. Their adapters
/// (VRVobContainer, VRVobContainerPhysicsChest, door lock picking, VRFocus) call
/// (VRVobContainer, chest lid physics, door lock picking, VRFocus) call
/// GetComponentInParent&lt;VobLoader&gt;() and got the PARENT's vob (often an unnamed zCVob) -
/// InvalidCastExceptions, "No door or container found for ><", doors/chests that don't work (G2 Xardas' tower).
/// </summary>
Expand Down
8 changes: 7 additions & 1 deletion Assets/Gothic-Core/Scripts/GlobalEventDispatcher.cs
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,11 @@ public static class GlobalEventDispatcher


// Fight events

/// <summary>
/// HINT: Left/Right have other values than Gothic.VR.Interaction.Models.VrHandSide (Left=0, Right=1).
/// Map them with VrHandSideExtensions, never cast.
/// </summary>
public enum HandSide
{
None = 0,
Expand Down Expand Up @@ -99,7 +104,8 @@ public enum HandSide
// LockPicking events
// 1. VobContainer -> LockPick
// 2. VobContainer -> Door/Chest
// 3. HandSide (for VR) -> (0 = Left, 1 = Right)
// 3. HandSide (for VR) -> int of Gothic.VR.Interaction.Models.VrHandSide (0 = Left, 1 = Right),
// not GlobalEventDispatcher.HandSide.
public static readonly UnityEvent<VobContainer, VobContainer, int> LockPickComboCorrect = new();
public static readonly UnityEvent<VobContainer, VobContainer, int> LockPickComboWrong = new();
public static readonly UnityEvent<VobContainer, VobContainer, int> LockPickComboFinished = new();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -112,7 +112,7 @@ public void Init(string root, bool mountModFiles = false, IReadOnlyList<string>
_prefab = new(s =>
{
// Lookup is done in following places:
// 1. CONTEXT_NAME/Prefabs/... - overwrites lookup path below, used for specific prefabs, for current context (HVR, Flat, ...)
// 1. CONTEXT_NAME/Prefabs/... - overwrites lookup path below, used for specific prefabs, for current context (VR, Flat, ...)
// 2. Prefabs/... - Located inside core module (Gothic-Core), if we don't need special handling.
var contextPrefixPath = $"{_contextInteractionService.GetContextName()}/{s}";
return new[] { contextPrefixPath, s }.Select(Resources.Load<GameObject>)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ public class NpcHelperService
{
/// <summary>
/// Ranges are in meter.
/// FIXME - We should use PERC_ASSESSTALK range to leverage HVR's Grabbable hover and remote grab distance!
/// FIXME - We should use PERC_ASSESSTALK range to leverage the VR grab hover and remote grab distance!
/// </summary>
public readonly Dictionary<VmGothicEnums.PerceptionType, int> PerceptionRanges = new ();

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ public class MobInteractionService
[Inject] private readonly NpcInventoryService _npcInventoryService;

/// <summary>
/// Doors use HVRPhysicsDoor and chests their lid physics - not the mob/trigger path.
/// Doors use VR hinge physics and chests their lid physics - not the mob/trigger path.
/// Beds are oCMobDoors too (BED*/BEDHIGH* visuals), but get used like other mobs (SLEEPABIT_S1).
/// </summary>
public bool ShouldHandleGrab(IVirtualObject vob)
Expand Down
2 changes: 1 addition & 1 deletion Assets/Gothic-Core/Scripts/Services/Vobs/VobService.cs
Original file line number Diff line number Diff line change
Expand Up @@ -515,7 +515,7 @@ private void AddToMobInteractableList(VobContainer container)
switch (container.Vob.Type)
{
// case VirtualObjectType.oCMOB: // FIXME - Needed? e.g. IMovableObject
// oCMobDoor excluded: doors use HVRPhysicsDoor for VR interaction, not AI_UseMob.
// oCMobDoor excluded: doors use VR hinge physics for interaction, not AI_UseMob.
case VirtualObjectType.oCMobFire:
case VirtualObjectType.oCMobInter:
case VirtualObjectType.oCMobBed:
Expand Down
3 changes: 1 addition & 2 deletions Assets/Gothic-Lab/Scripts/Handler/LabFightHandler.cs
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@
using Gothic.Core.Services.Caches;
using Gothic.Core.Services.Npc;
using Gothic.Core.Extensions;
using HurricaneVR.Framework.Core.Utils;
using Reflex.Attributes;
using TMPro;
using UnityEngine;
Expand Down Expand Up @@ -60,7 +59,7 @@ public void MonsterDestroyClick()

private IEnumerator SpawnMonster(int amount, string instanceName = null)
{
if (instanceName.IsNullOrWhiteSpace())
if (string.IsNullOrWhiteSpace(instanceName))
instanceName = _monsterSelector.options[_monsterSelector.value].text;

while (amount-- > 0)
Expand Down
8 changes: 8 additions & 0 deletions Assets/Gothic-VR/Editor/Backends.meta

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

8 changes: 8 additions & 0 deletions Assets/Gothic-VR/Editor/Backends/Hvr.meta

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
using UnityEditor.Rendering.Universal;
using UnityEngine;

namespace Gothic.VR.Editor
namespace Gothic.VR.Editor.Backends.Hvr
{
public class HurricaneActions
{
Expand All @@ -24,6 +24,9 @@ private static void ConvertHVRMaterialToURP()

foreach (var folder in _hvrMaterialFolders)
{
if (!Directory.Exists(folder))
continue;

materialFiles.AddRange(Directory.GetFiles(folder, "*.mat"));
}

Expand Down
Loading