This tutorial will walk you through building a simple virtual reality experiment using UXF. UXF is a package for Unity that allows users to more easily develop human behaviour experiments. Crucially, it will not be a general Unity tutorial (there are thousands already available!) but it will focus on how to make best use of UXF features. Here we will be creating a virtual reality visuomotor-rotation experiment. In these experiments, the user must reach towards an object under a rotated coordinate system until they adapt to the manipulation. Then, the visuomotor-rotation is removed, and the user must de-adapt to the manipulation.
The tutorial will begin by creating a simple keyboard/mouse version of the experiment. Then we will introduce UXF and begin collecting data and manipulating the task. Finally, we will make a few changes to make the project compatible with VR headsets. Here's a video of the final result:
If you want you can download the final project at github.com/immersivecognition/uxf-tutorial-project. See Appendix 1 below for downloading or viewing the files at each part of the tutorial.
Note: This tutorial was written in 2019 and UXF has recieved updates since then, so things may look a little different but almost everything should work the same. If you encounter any problems create an issue.
- Part 0 - Introduction to Unity & UXF
- Part 1 - Setting up the scene
- Part 2 - Mouse control
- Part 3 - Creating a start point
- Part 4 - Reaching for a target
- Part 5 - Implementing UXF
- Part 6 - Adding a miss outcome
- Part 7 - Adding a timeout outcome
- Part 8 - Visuomotor-rotation
- Part 9 - Error clamp
- Part 10 - More settings
- Part 11 - Instructions
- Part 12 - Adding a VR SDK
- Part 13 - VR controls
- Part 14 - Table height adjustment
- Part 15 - Making it look pretty
- Part 16 - Minor experiment additions
- Appendix 1 - Using GitHub to download the project files for this tutorial
- Appendix 2 - Links to resources for your projects (Models/Sounds/Textures etc)
- Appendix 3 - Links to useful Unity tutorials
- Appendix 4 - Useful scripts/snippets for your projects
- Appendix 5 - Example R script for processing UXF data
Initially written by Jack Brookes in 2019.