Progress Report - 4th May 2023 - Creating a Main Menu
I decided to use a separate basic level for the main menu, and have the player spawn into the house in the actual level. The main menu environment is simply a flat plane with trees. When placing the widget in the world, it is invisible and as such, the player cannot see or interact with it. The interact camera also doesn't appear to show anything.
For the menu, I created a Pawn consisting of a camera, motion controllers and widget interaction components, one for each controller the player would use. I used a pawn because the player can take control of it, and as it is exclusive to the main menu portion of the game, it is much easier to create a simple separate pawn instead of adapting the default player pawn that the unreal template provides.
As demonstrated here, the interact pointer function checks to see if the widget that is being targeted can be overlapped, and also checks the last hits that the motion controller has made. The widget interact L is the widget interaction component for the left motion controller, and the same code is mirrored for the right motion controller. This would allow me to implement a way for the player to have the ability to set a dominant hand in the settings. If there was only one motion controller, it would be more difficult to implement this as I couldn't use Boolean variables to deactivate the motion controller since the player wouldn't be able to do anything.
Here a spline mesh is created , which allows the player to actually see what they are pointing at. A variable is set for each motion controller so they player can have the pointer appear out of their dominant hand. The end position for the pointer is the target that it hits, this being the menu widget.
As the menu is invisible, I cannot actually test to see if this works correctly. I have tried setting the widget to visible in its parameters, but htis hasn't fixed the issue.
Here, the widget pawn checks to see if there is an action by the player every tick by calling the interact pointer function. The trigger input actions are converted into mouse pointer clicks, which the widget will recognise.
Here, each button on the widget has a unique action when pressed. The start button opens the main level, and the quit button quits the game after getting the player controller of the player that pressed the button. The settings button will involve opening a sub menu with individual settings such as height and movement adjustment.
VR/AR Dev Blog
Status | Released |
Author | Darragh Ryan |
More posts
- Progress Update - 5th May 2023 - Making a HouseMay 05, 2023
- Progress Update - 24-30th April 2023 - Building an EnvironmentMay 02, 2023
- Progress Update - 7th - 13th Nov 2022Nov 13, 2022
- SWOT Analysis - Initial ExperienceOct 23, 2022
- Week 1 & 2 ProgressOct 23, 2022
Leave a comment
Log in with itch.io to leave a comment.