Switching Response Panels

Announcements, support questions, and discussion for the Dialogue System.
Post Reply
RoguePimptastic
Posts: 22
Joined: Sat Dec 18, 2021 10:52 pm

Switching Response Panels

Post 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.
User avatar
Tony Li
Posts: 22110
Joined: Thu Jul 18, 2013 1:27 pm

Re: Switching Response Panels

Post 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.
RoguePimptastic
Posts: 22
Joined: Sat Dec 18, 2021 10:52 pm

Re: Switching Response Panels

Post by RoguePimptastic »

Thank you.

That works. I knew it would be something simple.
User avatar
Tony Li
Posts: 22110
Joined: Thu Jul 18, 2013 1:27 pm

Re: Switching Response Panels

Post by Tony Li »

Glad to help!
RoguePimptastic
Posts: 22
Joined: Sat Dec 18, 2021 10:52 pm

Re: Switching Response Panels

Post 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.
RoguePimptastic
Posts: 22
Joined: Sat Dec 18, 2021 10:52 pm

Re: Switching Response Panels

Post 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.
Post Reply