Skip to content

Commit 59f130a

Browse files
FIX: Menu position in CAVE2 Simulator mode when using Q/E to rotate player
1 parent f7b37f3 commit 59f130a

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

CAVE2/Scripts/UI/Omegalib-Style Menu/OMenuManager.cs

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
11
/**************************************************************************************************
22
* THE OMICRON PROJECT
33
*-------------------------------------------------------------------------------------------------
4-
* Copyright 2010-2018 Electronic Visualization Laboratory, University of Illinois at Chicago
4+
* Copyright 2010-2022 Electronic Visualization Laboratory, University of Illinois at Chicago
55
* Authors:
66
* Arthur Nishimoto [email protected]
77
*-------------------------------------------------------------------------------------------------
8-
* Copyright (c) 2010-2018, Electronic Visualization Laboratory, University of Illinois at Chicago
8+
* Copyright (c) 2010-2022, Electronic Visualization Laboratory, University of Illinois at Chicago
99
* All rights reserved.
1010
* Redistribution and use in source and binary forms, with or without modification, are permitted
1111
* provided that the following conditions are met:
@@ -85,6 +85,10 @@ void Update () {
8585
if(CAVE2.IsMaster())
8686
{
8787
angleOffset = new Vector3(0, CAVE2.Input.GetWandRotation(menuWandID).eulerAngles.y, 0);
88+
if (CAVE2.IsSimulatorMode())
89+
{
90+
angleOffset.y += CAVE2.GetCameraController().transform.localEulerAngles.y;
91+
}
8892
CAVE2.SendMessage(gameObject.name, "SetWandAngle", angleOffset);
8993
CAVE2.SendMessage(mainMenu.name, "ToggleMenu");
9094
}

0 commit comments

Comments
 (0)