Variants · VR
Designing VR water maze experiments
Every setting is a design decision. Here's how to make them.
In a virtual maze you control everything: the room, the cues, the speed of movement, the start points. That's a gift, and a responsibility, because each choice changes what the task measures.
VR water maze (HVS 6D VR)
A ready-to-edit methods paragraph for a human VR water maze run in HVS 6D VR and analysed in HVS Image.
The task was run in HVS 6D VR ([version]) with a Quest 3 headset connected by Link cable; participants navigated using [the Omnidrive treadmill / treadplate / arrow keys / head tilts]. Each experiment was defined in a vrScript file (HVS Image vrScript technical reference, doi:10.5281/zenodo.22303968), with a tracking diameter of [TRACKING_DIAMETER], a target radius of [TARGET_RADIUS] m, a maximum trial duration of [MAXIMUM_TIME] and [cue arrangement and scene]. Start positions and orientation were defined per trial in the vrScript. HVS 6D VR recorded time-stamped positions, which HVS Image ([version and build]) smoothed to one position per 100 ms (10 Hz) for all measures. Trials were analysed in HVS Image as for the water maze, with an inactivity threshold of [threshold] m/s (HVS Image Inactivity technical note, doi:10.5281/zenodo.21797205). [Participant recruitment, consent, safety procedures and practice, from your protocol.]
Notes for authors
Fill in every [square bracket] from your vrScript files and .BOND headers, which are the best configuration record. A TRACKING_DIAMETER of 200 is recommended for comparability with the rodent maze. Rodent and human VR values should not be compared directly. HVS 6D VR does not record experimenter assistance (scripted audio is possible), so describe any you gave.
Astur et al. (1998) used a computerised version of the Morris water task to assess whether it generalises to the human domain; cite it if you discuss human virtual water maze precedent.
Questions people ask
How do vrScript experiment files work, and where do they go?
Each experiment is a plain-text .vrScript file run by pressing its function key. 1) Open them in a text editor such as Notepad++ from the live vrScript folder on the VR PC. 2) Name live files default.vrScript and F1 to F12.vrScript. 3) Click 'Run HVS 6D VR', then press e.g. F1 to run F1.vrScript. 4) Keep descriptive-named copies elsewhere and copy them in as needed.
More detail
Trials are run from .vrScript files (up to 13 ready at once: default plus F1–F12). Open and edit them in a text editor such as Notepad++ straight from the live folder; try the supplied demonstrations first. After clicking 'Run HVS 6D VR', press the function key matching the file (F1 runs F1.vrScript). default.vrScript runs with no key; with several files HVS suggests an empty scene in default (SET_SCENE Main) so it is clear a key is needed. Live files must be in C:\Users\[User name]\AppData\LocalLow\HVS Image Software Ltd\HVS 4D VR (show hidden files). List all first-trial settings at the top; add trials with NEXT_TEST followed only by settings that change.
Going deeper
For more than 12 series, prepare descriptive-named versions elsewhere and copy them into place under the required names; keep copies of originals and copy edited live files back to your store. Supplied F-files are examples to adapt. The HVS vrScript technical reference (DOI 10.5281/zenodo.22303968) documents all commands. vrScript files and the .BOND headers are the best record of configuration for methods sections. Scripting is text editing, not programming.
Which general lines does each vrScript need (scene, names, tracking diameter, player scale)?
Set the scene, names and remarks, plus the tracking diameter and player scale. 1) SET_SCENE must exactly match a supplied scene name. 2) For the water maze use TRACKING_DIAMETER 200 and PLAYER_SCALE 0.16. 3) TRACKING_AREA_NORTH and WEST are 0; SOUTH and EAST equal the diameter. 4) For other environments use the supplied values (scale about 1).
More detail
Each vrScript needs a set of general lines that name the scene, the user, trial and subject, and set the tracking area and player scale: SET_SCENE (exact supplied scene name), USER_NAME, TRIAL_NAME, SUBJECT, DESCRIPTOR (e.g. group), REMARKS (appears in results), TRACKING_DIAMETER, TRACKING_AREA_NORTH 0, TRACKING_AREA_SOUTH = diameter, TRACKING_AREA_WEST 0, TRACKING_AREA_EAST = diameter, PLAYER_SCALE. For the VR water maze, a diameter of 200 (cm) is recommended so results are comparable with the rodent maze; keep it consistent across experiments. PLAYER_SCALE 0.16 correctly scales the participant relative to the environment. For target-finding environments TRACKING_DIAMETER is the environment width in metres from the demonstration files and PLAYER_SCALE is 1 or close to it.
Going deeper
Changing PLAYER_SCALE makes the environment feel bigger or smaller. Example from support: speed modifier 1, scale 0.16 and a 2 m pool gave about 0.14 m/s active speed (about 14 s to cross the diameter).
How do I set the navigation mode: treadmill, arrow keys, head tilts or controllers?
Choose the mode with a few vrScript lines. 1) Arrow keys work with no extra lines (up/down forward/back, left/right rotate). 2) To allow only some keys: DEACTIVATE_NAVIGATION_KEYS, then ACTIVATE_KEY UpArrow etc. 3) Treadmill: add CONTROL_TRANSFORM head_transverse, subject_transverse plus READ_OMNI on, SMOOTH_MOTION, OMNI_SENS and OMNIDRIVE_INPUT. 4) Omit CONTROL_TRANSFORM when head turns should not steer.
More detail
Keyboard: arrow keys give natural movement; A, S, D, F translate (not recommended without a specific purpose). Restrict keys with DEACTIVATE_NAVIGATION_KEYS followed by ACTIVATE_KEY lines. Where head turns set direction (treadmill or rotating chair) include CONTROL_TRANSFORM head_transverse, subject_transverse; omit it for arrow-key navigation. Treadmill or treadplate also needs READ_OMNI on, SMOOTH_MOTION w, n, OMNI_SENS and OMNIDRIVE_INPUT (use your supplied values). Head tilts can be mapped to keys with CONTROL_INPUT lines, e.g. CONTROL_INPUT left_tilt, LEFT_ARROW, -10 (10 = minimum tilt angle); map to A/D/F/S for translation; omit to disable.
Going deeper
For keyboard navigation on a treadmill system, HVS advised removing CONTROL_TRANSFORM, keeping DEACTIVATE_NAVIGATION_KEYS and adding ACTIVATE_KEY UpArrow, LeftArrow and RightArrow. Mobility-limited participants can use the arrow keys. Vive controllers are not officially part of the system (they may work: right disc forward, left disc turn); the treadplate is recommended for proprioceptive feedback, immersion and less motion sickness. Windows Sticky Keys has caused unexpected sliding; turn it off.
How do I change movement speed, rotation speed or apply gains?
Change SPEED_MODIFIER for forward speed and DIRECTIONAL_ROTATION_SPEED for key or tilt rotation. 1) Example: SPEED_MODIFIER 0.3 and DIRECTIONAL_ROTATION_SPEED, 0.5. 2) Head-turn rotation follows the head, not this value. 3) For gain experiments, use larger, smaller or negative values to change or reverse expected motion.
More detail
Adjust translation and rotation speed with SPEED_MODIFIER and DIRECTIONAL_ROTATION_SPEED; rotation by head turns follows the speed of the head turn. Once participants are used to certain speeds, these lines can give faster or slower than expected motion, and negative values reverse it. With the optional vertical environment, POINT_OF_VIEW third_person, 0 3 0 90 0 0 shows the arena vertically from 3 m away; a red arrow moves while the viewpoint stays fixed; the fifth value rotates the view; a third value of -0.2 can make the arrow easier to see with head tilts.
Going deeper
Treadmill forward motion maps each footfall to movement in the head-gaze direction; with speed modifier 1 and 0.5 s per step, two or more steps per second feels natural. Settings are retained in the .BOND headers for reporting.
How do I set start points and positions in the vrScript?
Positions use six numbers: east, height, north, then three angles. 1) In the water maze east and north are proportions of pool radius (0.6 = 60% to the edge). 2) Example: TRIAL_START_POINT -0.7 1.13 0 0 270 0 starts 70% west, at water height, facing west. 3) PRE_TRIAL_START_POINT sets the practice place; press Enter to move to the trial start.
More detail
A position in the vrScript is six numbers: east/west from centre (+ east), height above floor in metres, north/south (+ north), then sagittal, transverse and coronal rotation in degrees clockwise from North. In the water maze east and north are proportions of pool radius; in other environments they are metres. Before the first trial the participant waits at PRE_TRIAL_START_POINT to check the headset and practise; Enter moves them to TRIAL_START_POINT. In -0.7 1.13 0 0 270 0, 1.13 is water-surface height and 270 means facing west (0 north, 90 east, 180 south). Starting facing the poolside is conventional. Use 0 -1000 0 0 0 0 for the practice pool (featureless arena) or the holding pen in the Standard Laboratory (check your example files).
Going deeper
Start rotation is relative to the calibrated real-world facing direction: a participant facing 180° away from it at the start faces the opposite way in VR. Keep start and target points within about 7/9 of the pool radius: targets too near the wall can leave the virtual body overlapping the wall when the next trial starts at the target. Standard starts face outwards towards the wall and are recorded in .BOND headers. If the participant walks through the wall or starts on the lab floor, recentre the headset with them standing in their real trial position, and ask them to keep still before you press Enter.
How do I set the target, a visible platform and cues in the VR water maze?
Set TARGET_RADIUS (metres) and TARGET_POSITION; add a visible platform with MOVE_OBJECT. 1) Example: TARGET_RADIUS 0.05 and TARGET_POSITION 0.4 1.13 0.4 0 0 0. 2) Visible platform: MOVE_OBJECT Visible_10cm_Platform 0.4 0 0.4 0 0 0 (height 0, rest matching the target). 3) To remove it later, move it away, e.g. first coordinate 20. 4) Cues and pool screens move the same way.
More detail
The trial ends when the participant reaches the target edge defined by TARGET_RADIUS (metres) and TARGET_POSITION. A visible platform marker uses MOVE_OBJECT Visible_10cm_Platform with height 0 and other coordinates exactly matching TARGET_POSITION; once used, it stays until moved away (e.g. first coordinate 20). Cues and objects are added, moved or removed the same way, e.g. MOVE_OBJECT Star_Cue, Sphere_Cue, Hexagon_Cue, Cone_Cue, Pool_Screens. In target-finding environments, a cone marker (MOVE_OBJECT Cone_Cue with the target's coordinates) shows the target; remove it by moving it (e.g. first coordinate 1000), and target height normally equals start-point height.
Going deeper
TARGET_RADIUS 0.10 equals 10 cm in a 200 cm rodent-scale pool. The HVS 6D VR 2025 location_of_interest feature defines extra positions for analysis (e.g. a proximal cue location) and can be applied afterwards. TARGET_RADIUS is a radius, not a diameter.
How do I set trial type, time limit, time on the platform and return-to-start?
Use TRIAL_TYPE, MAXIMUM_TIME, STOP_INTERVAL, RETURN_TO_START and INTER_TRIAL_INTERVAL. 1) e.g. MAXIMUM_TIME 60. 2) TRIAL_TYPE Regular, visible platform or Probe; probes run to the full time. 3) STOP_INTERVAL 10 lets them look around at the target. 4) RETURN_TO_START adds a return trial; INTER_TRIAL_INTERVAL 5 blanks the scene between trials.
More detail
MAXIMUM_TIME sets the limit if the target is not reached. TRIAL_TYPE can be visible platform, regular or probe. Probe trials run to the maximum time even when the target is reached; keep the learned position in TARGET_POSITION so it is shown on plots and analysed. In other trials the trial ends at the target edge and the participant can look around for STOP_INTERVAL seconds; with RETURN_TO_START a new trial starts in which they return to the start (repeat the line for each trial where needed). The environment then disappears for INTER_TRIAL_INTERVAL seconds.
Going deeper
Messages: REGULAR_END_TEXT (e.g. Target Reached!), TIMED_END_TEXT (Time's Up) and END_OF_SERIES_MESSAGE; leave blank for no message, and any language may be used. Triangle-completion series can start each trial from the previous target.
Which VR environments and distal cues can I use?
Choose a realistic laboratory or an idealised featureless arena with SET_SCENE, then add or remove cues. 1) Lab: MOVE_OBJECT Standard_Water_Maze_Cue_Set, Laboratory_Enclosure, Natural_Cue_Set or Pool_Screens (first coordinate 20 removes). 2) Idealised: Star_Cue, Sphere_Cue, Hexagon_Cue, Cone_Cue (all coordinates 0 removes). 3) Use the holding pen (lab) or practice pool (idealised) as pre-trial start.
More detail
You can choose among several supplied VR environments, from a realistic water maze lab to an idealised cue-only arena, and add or move distal cues in each with vrScript lines. Options include a typical MWM lab with four cues, with or without pool screens; a lab with only natural cues; or an idealised environment with no lab features, shadow or walls, where any of four cues can be placed anywhere. Scene names are in your example .vrScript files. In the lab, MOVE_OBJECT lines add or remove the cue set, enclosure, natural cues and screens (first coordinate 20 removes). In the idealised arena, Star, Sphere, Hexagon and Cone cues are positioned by height (second) and distance (first and third) coordinates; Star and Hexagon need rotating to face the arena. Pre-trial start: holding pen in the lab (e.g. -5.2 2.2 4.2 0 0 0), practice pool in the featureless arena (0 -1000 0 0 0 0).
Going deeper
Further environments (natural pool, Minecraft-style, human-scale, apartment, suburban, forest/mountain) are options on some systems. Distal cues can be near the pool or large and far away (direction rather than position).
How do I design a dual-strategy VR water maze with proximal cues?
Place proximal sphere cues with MOVE_OBJECT, combining them with distal cues to test different strategies. 1) Choose spheres in white, mid grey, dark grey, red or green (eight of each). 2) e.g. a ring of seven mid grey and one white sphere around the pool. 3) Move them in forced-strategy trials to see which cues participants follow.
More detail
A dual-strategy water maze lets you tell apart navigation by distant room cues (allocentric) and by nearby cues or routes (egocentric), by adding movable proximal cues to the VR scene. In the dual or multi strategy version, place proximal cues (eight spheres each in white, mid grey, dark grey, red and green), e.g. MOVE_OBJECT Proximal_Cue_Mid_Grey_1 0.4 1.5 0.4 0 0 0 (east, height, north). Design options HVS has suggested: white space with no cues (egocentric route memory); small cues near the target (proximal); large far cues (allocentric, using stereopsis and triangulation); combinations; or a realistic distant environment with or without proximal cues; then forced-strategy trials that move cues.
Going deeper
Allocentric/egocentric behaviour identification is a paid analysis add-on: with a moved proximal cue, search relative to the distal-consistent position indicates allocentric and relative to the new proximal position egocentric. Edit files in a working folder and copy them back after any live edits.
How do target-finding tasks in other environments differ from the VR water maze?
They use the same vrScript approach, but positions are in metres and player scale is about 1. 1) Set TRACKING_DIAMETER and heights from the demonstration files. 2) Use TARGET_RADIUS and TARGET_POSITION; show the target with a Cone_Cue marker if wanted. 3) Probe tasks run to the maximum time to test confidence.
More detail
Target-finding (way-finding) tasks use .vrScript files named default and F1–F12 as for the water maze. Differences: TRACKING_DIAMETER is the environment width in metres; PLAYER_SCALE is 1 or close; positions are metres from the centre, and height is above ground level (use the demonstration values, as ground can differ from floor level); a visible cone marker shows the target (move it to e.g. first coordinate 1000 to remove). PRE_TRIAL_START_POINT and TRIAL_START_POINT may be the same. Task data, analysis and back-up follow the water maze procedures.
Going deeper
Probe tasks continue to maximum time, testing the participant's confidence in the target location; keep the learned position in TARGET_POSITION. Other paradigms include triangle completion (path integration).
How do I set up the relaxation or headache modules, and why doesn't the audio play?
Set MAIN_MP3 and END_WITH_MP3 with your chosen mp3 file for each task; the session moves on when the mp3 ends. 1) Use files from …\HVS_4D_VR_Data\Audio (or HVS 6D VR_Data). 2) Audio starts after you press Enter. 3) If it never starts, check the file exists and the name matches exactly. 4) If the scene runs on afterwards, check END_WITH_MP3.
More detail
Follow the way-finding instructions and add MAIN_MP3 and END_WITH_MP3 lines naming mp3 files from C:\HVS Image[version]\Programs\VR\HVS_4D_VR_Data\Audio; the VR moves to the next task when the mp3 ends. Audio plays after Enter is pressed (background birds before). If the mp3 never starts, the file is missing or the name does not match; if the scene continues after it, END_WITH_MP3 is missing or mismatched. Hearing the birds confirms sound settings are fine.
Going deeper
If the Audio folder is missing, copy it from the most recent VR backup folder. Relaxation audio files are provided by HVS. Video playback is not yet included but is possible in principle.
How do I use EEG biofeedback in VR?
Add the EEG lines to the vrScript, then tune the relaxation thresholds while watching the waves. 1) EEG_SHOW_DATA_IN_HMD alpha theta delta (and/or SUMMARY) to display waves. 2) Set RELAXATION_THRESHOLD, OUT_OF_STATE_TIME and RELAXATION_TIME_THRESHOLD. 3) Add OUT_OF_STATE_MP3 for extra relaxation. 4) Wait for the waves to appear before pressing Enter.
More detail
EEG_SHOW_DATA_IN_HMD and EEG_SHOW_DATA_SUMMARY_IN_HMD (with wave types, e.g. alpha theta delta) show per-sensor and summary activity in the headset and on screen; set them to OFF to hide. RELAXATION_THRESHOLD (e.g. -230) sets the relaxed level; OUT_OF_STATE_TIME (e.g. 5 s) is how long 'not relaxed' must last to trigger extra relaxation; RELAXATION_TIME_THRESHOLD (e.g. 10 s) is how long 'relaxed' must last again to move on. Waves show green when relaxed and red when not. MAIN_MP3/END_WITH_MP3 set audio; OUT_OF_STATE_MP3 adds a deepener when needed.
Going deeper
Experiment with the thresholds while displaying EEG on screen. EEG per second can be recorded in BOND\EEG. Biofeedback can also use heart rate or skin conductivity on some systems.
What you can change in each VR trial is listed in the configurable parameters for the HVS 6D VR Morris water maze.
Spotted a mistake, or know a better source? Tell us and we'll fix it and say so on our corrections page.