Design of a Four-in-a-Row on PC using an Astra Pro Orbbec camera to detect the movement of the player’s hand and move the token (motion controller). Game designed on Unity (C#)
Four-in-a-row with Motion Controller
We were a team of 3 to build this project. To keep well-organized, we use Miro, a online collaborative whiteboard platform that enable brainstorming with digital sticky notes to planning and managing agile workflows. We use it to organize the tasks and keep an eye on the project progress.
We organized our code in the following way:
Some of the functions were specific to the Camera Pro Orbbec such as “OnNewFrame”. This function updates each time a new frame of the camera is detected.
I have encountered some difficulties in this project. I think it’s worth mentioning them and explaining how I was able to overcome them.
– There wasn’t much documentation on the net so it was difficult to know how to initialize the camera. I had to do some tests and a lot of research through the provided scripts to solve this problem.
– The camera was also too fast, sometimes the actions were linked involuntarily when we closed the hand to select for example an option in the menu. I added a toggle system. The hand has to open and close again to select something.
– When changing scene either for the menu or to play, the camera was destroyed so unusable. So I created a singleton of the GameManager to make it last in all the scenes and never destroy it thanks to the DontDestroyOnLoad function of Unity.
In this short video, I will explain you the project, and what I did exactly on this project. The video is in English ! Enjoy !