This week , we started working on our third assignment. The main goal of this assignment is to create an application with VR mechanics using Meta Quest and Unity. We made the decision to create a game in which the player operates a restaurant and serves various foods based on the requests of the customers.
We first set up the project and version control (Plastic SCM) before getting to work. We ran into a small problem while trying to display the project in the quest, but we managed to fix it.
Later, we downloaded assets from Unity Asset Store. We chose the following assets:
- Restaurant: https://assetstore.unity.com/packages/3d/props/interior/restaurant-interior-full-pack-153273
- Clients: https://assetstore.unity.com/packages/3d/characters/toony-tiny-people-demo-113188
- Food: https://assetstore.unity.com/packages/3d/props/food/free-casual-food-pack-mobile-vr-85884
Afterwards, we worked on spawning the clients. In order to do that, we wrote the script, which spawns the clients every 10 seconds in random places. Additionally, we were able to alter each person's position to make it appear as though they were seated.
We also implemented the functionality for grabbing the food. In order to do that, first we added the hands assets to the LeftHand and RightHand Controller. Later, we configured the Controllers - we removed all the components and leave only the needed ones - XR Controller, XR Direct Interactor and Sphere Collider. We added XR Grab Interactable to the grabbable objects (food). When we tested it for the first time, we met an issue, because our player went up while grabbing the object. The thing, which caused this problem was RigidBody in the object's component. We could not remove the RigidBody because it was needed for XR Grab Interactable component. To fix this problem, we wrote the additional script with two methods - Grab and Drop and attach it as an object's component. The purpose of these methods was to turn on the trigger while grabbing an object and turn off the trigger while dropping an object.
Next week, we will continue our work on the assignment. We will start from implementing the feature that will allow clients to place meal orders and picking it up. We are planning to implement the ordering functionality in a way that an icon representing the meal the consumer desires will show over his head. We will also implement the feature for spawning the food in random places in the restaurant's kitchen. At the end, we will polish all the functionalities, remove all the non-used components and record the video presentation.
Author: Roksana Dziadowicz
Comments
Post a Comment