Partially implement lobby ui, fix ui pointers on network rig
This commit is contained in:
@@ -1,5 +1,7 @@
|
||||
using HurricaneVR.Framework.Components;
|
||||
using HurricaneVR.Framework.ControllerInput;
|
||||
using HurricaneVR.Framework.Core.Player;
|
||||
using HurricaneVR.Framework.Core.UI;
|
||||
using Meta.XR.MultiplayerBlocks.NGO;
|
||||
using Sirenix.OdinInspector;
|
||||
using System.Collections;
|
||||
@@ -40,7 +42,7 @@ public class PlayerComponent : NetworkBehaviour
|
||||
|
||||
public Vector3 Position => controller.transform.position;
|
||||
|
||||
public Vector3 Rotation => controller.transform.eulerAngles;
|
||||
public Vector3 Rotation => controller.Camera.forward;
|
||||
|
||||
private bool isSoloRig => !networkObject.IsPlayerObject;
|
||||
private bool isMultiplayerLocalRig => networkObject.IsLocalPlayer;
|
||||
@@ -67,6 +69,14 @@ public class PlayerComponent : NetworkBehaviour
|
||||
{
|
||||
StartCoroutine(AddDontDestroyToDependencies());
|
||||
|
||||
if (isSoloRig || isMultiplayerLocalRig)
|
||||
{
|
||||
foreach (var pointer in GetComponentsInChildren<HVRUIPointer>())
|
||||
{
|
||||
HVRInputModule.Instance.AddPointer(pointer);
|
||||
}
|
||||
}
|
||||
|
||||
if (!isSoloRig) return;
|
||||
|
||||
audioListener.enabled = true;
|
||||
|
||||
Reference in New Issue
Block a user