A Virtual Reality Experience in Changing Gravity

Made by Brett Glasner & Jordan Kravitz

CS 498 Spring 2015 Final Project: Professor Steve LaValle

Virtual reality presents an interesting opportunity to experiment on an individual’s understanding of mechanics of the physical world. In the real world, the physics of the universe never change, but in a virtual environment that isn’t necessarily the case. This project demonstration achieves this by manipulating the gravity of the environment in a manner such that it doesn’t always act in the same direction. For example, the user is able to easily walk up walls and the ceiling. This type of project contributes to the VR field by testing how people are able to adapt to a universe with different physical rules given that the brain is only used to the laws governing reality. Games like Portal play with this idea by creating non-Euclidean pathways between two points, but this project takes the experience one step further by placing the gravitational perspective changes directly in viewpoint of the player.

Principia is a puzzle game where the player must use his or her understanding of how the different gravitational fields in the map work in order to progress. For example, a wall next to a bottomless pit from one gravitational perspective might be a bridge across that gap in a different one. Players interact with objects and switches to create new pathways, but those pathways aren’t always easily apparent. The objects themselves magnetize to metal surfaces, so players must experiment with how the objects respond to the physics of the environments in order to solve the puzzles. Additionally, some surfaces are made of an insulating material that the player is unable to walk up, so players need to think carefully about how to traverse the environments. There are four puzzles total in the game with each subsequent puzzle increasing in difficulty. The addition of realistic effects and audio serve to make the game more immersive for the player.

A video demonstrating Principia can be seen in the link below:

Significant technical challenges needed to be overcome in the development of this demonstration. The component most crucial to the project was the mechanic allowing the player to change gravity, so a great deal of time was spent making sure the mechanic functioned correctly and comfortably. Gravitational changes are handled by constantly checking the vector normal to the surface the player is currently standing on. The player has a spherical collision detector around him at all times, and when that sphere collides with a wall the player is snapped to the surface of the wall. The normal vector of the new wall is then compared to the player’s current up vector, and the player’s up vector is updated to be normal to the new surface which is interpreted by the player as a change in gravity. The process is quite smooth and transitions quickly making it feel natural and comfortable.

Similar mechanics had to be built to handle player interaction with objects such as picking up crates and pressing buttons, and another mechanic was built that magnetizes crates to the surface to which they are closest. After developing all these mechanics we designed all of the levels using only the default Unity objects. Some of the particle effects and textures were imported from the asset store, but all of the levels and mechanics were designed by us.

The mechanics for changing gravity and carrying objects both work very well in the game. Adjustments are made rapidly so as to not provide a great deal of optical flow to the player, and the mechanics are intuitive enough that testers seemed to pick them up very quickly.

There is a great deal of potential with future work in this project. The final level in Principia is a 3D maze; however a clever player can quickly see that the maze itself is not very complicated. Using the mechanics built in this project, someone could develop a much more intricate 3D maze that would greatly test the spatial awareness of a player. Changing gravity means that players need to concern themselves not only with directionality in this case but also with orientation when they enter a new room. A clever level designer could easily build a very confusing environment with the constraints of gravity lifted. This would be very interesting for testing people’s abilities to develop a sense of direction within the “map” and how greatly understanding of orientation would affect that. Any other type of demonstration testing a player’s 3-Dimensional spatial awareness could also be tested using these mechanics.

In addition to allowing the player to traverse up vertical surfaces, the code developed for this project can handle changing gravity along curved surfaces as well. This feature was downplayed in the demo though because through testing we found that it could be quite uncomfortable for players due to the large amounts of vection that can occur when constantly changing gravity. Trying to walk around a ninety-degree external surface (for example walking along the outside of a cube) is also very problematic. In some cases, if the player is facing a very specific direction he can cross the edge between these two surfaces, but most of the time the player just falls off the side. We tried to limit the amount of external surfaces present in the game to compensate for this, but it was not always possible. Furthermore, some of the object physics native to Unity behave unpredictably when they interact with the mechanics we have built, but this occurrence is uncommon and can be fixed with improved implementation.

Despite having the player engage in constant accelerations which is discouraged in the Oculus Best Practices guide, the experience is fairly comfortable overall. Transitions between walls is intentionally quick to make accelerations as instantaneous as possible, and curved surfaces are avoided to limit the amount of optical flow the player experiences. As discussed in class, vection causes the greatest amount of discomfort within the experience, so measures were taken to reduce occurrences of it as much as possible. For example, yaw rotations of the player occur in discrete steps so that when turning around the player has little optical flow. We also made the player walk fairly slowly so that optical flow at the sides of the player’s vision would be reduced.

Principia engages the player visually and aurally to create the most immersive experience as possible while simultaneously attempting to minimize discomfort. The puzzles test a player’s awareness of orientation in interesting ways, and altering gravity presents a novel way for players to experience different physics than what they see in the real world. We hope you enjoy your time with Principia.