Create Distance grab component:
Create a BP staticMeshComponent, name DistanceGrabComponent
Choose arrow for its mesh
Create 3 variables
So far it’s to check if anything has grabable components by hitting everything in the scene within a direction, by running loop, then either ignoring those actors, or target them for next action
Continue:
Set detecting boolean be true
To a loop back to serach again any targeted grab if all parameters are true/false, connect all not valid/not true nodes back to earlier nodes as looping
Final:
Create new function, called SetDetecting
2nd function: Grab:
promote local variable for Grab Comp
Back to event graph, add following for false branch:
Go to VR Pawn:
Open viewport, add distance grab components on both hands:
In event graph, add following in inputaction grab nodes:
Ending nodes:
Duplicate on right hand