Menu/UI

Inventory Wheel



Create Widget called WB UI
image.png
Style:
Normal: Select the image on each button, Outline Settings (Width: 0), alpha tint: 0, draw as image
Hovered: : Select the image on each button, change to red color, draw as Round box,

Create a actor BP, called WheelSelection UI, add 2 components:
Widget component: scale down, rotate, , add widget class, and set draw size
Increase draw size if still don’t see the widget menu in the viewport
image.png
Change to world dynamic in trace channel in widget interaction, location X -50
image.png
In event graph,
add variable and tick instance editable, expose on spawn
image.png
image.png
Add custom event called select
image.png

Add the same variable (motion controller) in WB UI too
image.png

Back to Wheel Selection BP, even begin play
image.png

Open VR Pawn
Delete widget interaction right and left components
Disconnect action grab left and grab right nodes:
image.png
(Disconnect by assuming player only be able to grab the tools from wheel UI, not anything else)

Add 2 input actions called IA Left Button, IA Right Button
image.png
Open IMC Default , add follow 2 mappings:
image.png

Back to VR Pawn, event graph:
Promote new varilable: left hand wheel UI, from Spawn actor from class node
image.png
Repeat on right hand, change to right hand variables
image.png

To set destroy one UI if both hands open at the same time:
image.png

To check first if the hand holding anything (only open wheel UI when nothing held on hand, or else destroy the UI), use Held Component left/right variables
image.png
Repeat on right hand

Back to WB UI, event graph
image.png
Add Pressed node on each button:
Set the graph (up and down button)
image.png
Repeat on left and right button, change spawn actor from pistol to grabble cube
image.png

Want to print your doc?
This is not the way.
Try clicking the ⋯ next to your doc name or using a keyboard shortcut (
CtrlP
) instead.