Cube movement

With the cube now able to spawn in, I had to make it so that the cube covered someone’s face. This meant moving the cube away from the target.

 

I briefly experimented with changing the colour of the cube to determine what colour cube blocked someone out best, especially as the cube would be transparent with the glasses on. I found that a white cube worked best.

 

For my first implementation I simply made the cube move based off of key presses, however I later found a script to handle android swiping movements[1]. I could then use this script to detect swipes in a direction and adjust the position of the cube based off the swipes. The only real problem I faced with the implementation of this script was the way the logic worked, moving the cube with swipes required multiple swipes compared to just holding down a key.

 

I also made it possible to scale the size of the cube, as the cube gets based off the size of the target, and the target size is not the same as someone’s face, so it is an important quality of life to change the cube size for the cube to actually block someone’s face out.

 

 

[1]Ferran Bertomeu, 2019, SwipeInput https://gist.github.com/Fonserbc/ca6bf80b69914740b12da41c14023574

 

 

Leave a Reply

Your email address will not be published. Required fields are marked *