Hand Functions

Drawing in VR



Aim: To make right trigger draw, left trigger delete

Open VR pawn in VR template, choose Trigger left and Right nodes disconnect from default
Create Event Tick node
Add following variable: Previouslocation, Distance, DrawingSplines, LastPoint:
image.png

Set Right trigger as follow:
image.png

Set the gate node for right trigger pressed and released, and the distance setting after previous location:
image.png

Continue the graph, set Static Mesh to Linesegmentcylinder on Add Spline Mesh Component node:
image.png
Continue (set End position):
image.png

Continue (set Start point, greater value and branch T/F, to determine whether it’s a new part drawing or the same drawing altogether):

image.png

Clear off splines with left trigger controller:
Remark: Destroy component actor created by drag from array element from for each loop
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.