Trace Interaction (Adding it to your own project) - mitchemmc/VRContentExamples GitHub Wiki
##Adding Trace Interaction to a Custom Pawn
When creating the trace interaction level I aimed to make it as modular as possible to aid in those who want to use the functionality in their own projects.
###The Trace Interactor
To use the trace functionality in your own project the trace logic is broken out into its own component. The "TraceInteractor" allows us to interact with the world and the "TraceVisualiser" component allows us to visualise the trace.
To add trace functionality add a new "TraceInteractor" component and attach it to the location you want to trace from (Usually the Camera Component or a Motion Controller Component)
Next we'll setup the interactor in the event graph
- We create a new custom "Trace Visualiser" actor that will allow us to see our trace, if you need you can set up the animation speed or segment scale
- Next we call the "Setup" function on our trace interactor passing in our visualiser. You can also select which trace type you would like and choose whether the visualiser should activate on a button press instead of being always active
Next to activate the trace interactor we call the "Activate Event Down" and "Activate Event Up" function on the event that we would like to activate the interactor
Lastly if you need to change the settings during run time there are some function for that
- Change the parabola trace settings
- Change the line trace settings
- Change the sphere trace settings
And that's it, feel free to chuck any of the blueprints shown in the Trace Interaction level into your own experiences and start interacting with them.
-Mitch