Page 1 of 1

Switching Response Panels

Posted: Wed Sep 07, 2022 8:47 am
by RoguePimptastic
I'm trying to do a build that will allow the player to toggle between playing in VR or on the Desktop. Since there is a VR Emulator, everything is mostly going just fine. The XR Rig just becomes a fancy first person controller. When in VR, the response menu appears above the wrist, when on Desktop, I want the response menu to be on the screen so that the player can use a mouse to make dialogue choices.
When in Desktop mode, the first conversation is working perfectly. I turn the dialogue actor component off of the XR Rig, and disable the Response Menu Panel object, and the choices appear on the screen, and can be interacted with by the mouse. When the second conversation, triggered by an on Trigger Enter starts, it uses the Wrist Response Menu. The dialogue actor that uses that response menu is still disabled, so I'm not sure why it would use that response menu.
I'm sure there is a better workaround. Just haven't figured it out yet.

Re: Switching Response Panels

Posted: Wed Sep 07, 2022 9:02 am
by Tony Li
Hi,

Does the OnTriggerEnter Dialogue System Trigger's Conversation Actor point to the XR Rig by any chance?

You could create two Dialogue Actor components assigned to the Player actor -- one on the XR Rig and another GameObject that's only active when in Desktop mode. Keep both of them disabled at design time, and enable the appropriate one when the game starts in VR or Desktop mode.

Re: Switching Response Panels

Posted: Wed Sep 07, 2022 9:11 am
by RoguePimptastic
Thank you.

That works. I knew it would be something simple.

Re: Switching Response Panels

Posted: Wed Sep 07, 2022 9:17 am
by Tony Li
Glad to help!

Re: Switching Response Panels

Posted: Wed Sep 07, 2022 9:54 am
by RoguePimptastic
Okay, now I'm having a problem switching back to VR. The wrist Response Menu is no longer responding to the trigger. It is giving me an On Click has no Receiver error.

My event system has two components. UI System UI Input Module, and VRUI System. The first one allows the Response menu to be interacted with by the mouse. the second one allows the response menu to be interacted with by the XR Rig's Right Hand Pointer. I toggle between the two depending on the mode the player chooses.

For some reason now, the response menu is no longer accepting clicks from the Right Hand Pointer. I changed the response buttons colors so it is really obvious when one is highlighted (brown), selected (light green), and then pressed (dark green).
When the Hand Pointer is pointed at a response button, it turns brown like it should. When I press the trigger button, it turns dark green, indicating that it has been pressed, but then just turns light green and gives the no Receiver error.

Re: Switching Response Panels

Posted: Wed Sep 07, 2022 10:22 am
by RoguePimptastic
Just figured it out.
When I was in VR Mode, I disabled the Dialogue UI that was assigned to the Dialogue Manager. I re-enabled that, and everything works great.