Learnings from this week in VR

R K Lewis
4 min readOct 13, 2020

Yesterday was a brilliant day. After weeks of doing laps around the park over the summer racking my brain for a solution to my tailspin problem (see previous blog) the remedy I came up with took under and hour to implement. Dot product essentially measures the degree to which two vectors point in the same direction. My SNOW ANGEL flight solution basically involves continuous measurement of two dot products: between vector 1 (from the position of each motion controller to a location in line with the centre of the PLAYER’s body) and vector 2 (representing the forward direction).

At first I was using the position of the VR camera (i.e. the head-mounted display) for the second position of vector 1, but this meant that the value of the dot product changed both whenever the PLAYER moved their head to look around as well as when they actually moved the motion controller. This was made worse by the fact that the forward direction was also being taken in reference to the VR camera, so while it worked fine when keeping the head still and only moving the arms (which I naturally did in the first few weeks of testing), once I started looking around as I steered around it started causing chaos with the flight controls.

I could have remedied this by asking that participants keep their heads still while flying, but in this project it’s extremely important that the PLAYER be able to move their head freely because the aim is to mimic bird flight as closely as possible and thereby increase the sense of immersion, agency and body ownership, so that simply wouldn’t do.

The solution that eluded me for so long, which seems ridiculously obvious in retrospect, was to use a game object that stays in the same plane as the arm movements throughout the entire experience as both the anchor position for vector 1 and the forward direction reference for vector 2. I already had a “Base Plate” (a flattened cube with a body outline superimposed on it) attached to the VR “Player” Game Object, which was appropriately aligned to the centre of the PLAYER’s body position to provide guidance to the PLAYER as to the appropriate body position when starting the game. So I simply moved the relevant script so that is was no longer a component of the VR Player but instead as a component of the Base Plate. That way when the position was computed by the script, it would anchor to a fixed point — the Base Plate — rather than a moving point — the VR camera.

Today, however, when I came back to continue development of the flying mechanics I found that the position of the HMD had become shifted by 90 degrees in relation to the Base Plate, the game world and everything else for that matter. Two hours of my life was lost, going round and round in circles trying to the find the parameter that had been accidentally changed to induce this shift, until I realised my mistake. At the end of yesterday’s session I refreshed the Steam VR Room Setup process to increase the size of the boundaries so that the Steam Chaperone Safety Grid wouldn’t appear every time I put the motion controllers near the extreme of movement (close to the wall). What I had forgotten, because it was done impulsively on the spur of the moment, was that when I was asked to point the motion controller at the display screen, rather than pointing 90 degrees away from the screen as I usually do, for some reason I did as I was told. And that ladies and gentlemen was the cause of the shift in orientation of the HMD and motion controllers in respect to everything else. This would, of course, have been immediately obvious were it not for the fact that everything in this particular Unity project has been flipped 180 degrees so that the landscape which is effectively projected on the ceiling in reality appears to underneath the PLAYER when in VR as they cruise.

I am trying to be philosophical about this. Instead of viewing it as a crushing waste of time, I’m trying to be happy that I now finally understand what the purpose of that particular step is in the Steam VR Room Setup process. While the steps that delineating the position of the floor and the outer boundary of the play area were perfectly intuitive, I never really understood what pointing at the screen and pulling the trigger actually did. While I could have looked it up, I have instead learned the hard way, but better late than never. Otherwise, Sod’s Law says it could have happened just before a major player in the VR industry had a go on Be_A_Bird_VR at the final exhibition of Master’s projects.

Next up, I’m going to settle down to get my PLAYERS flapping their wings to velocity, rather than merely gliding around by changing the angle of their wings…

--

--

R K Lewis

This is the journey of a Master of Art's in Virtual Reality