virtueone            
  home     support     info  

 


                
Programming input using the accelerometer... - Posted on: 12/19/2018   [Uncategorized]



An accelerometer is hardware that measures the acceleration of a device. It's the component that allows you to control apps and games by moving your device through space.

I've been experimenting with this and I tried three different methods for controls...

The first method moves an object using Translate, as shown in the Unity documentation. For the second test, I modified a free-floating camera script, so the player can fly the camera around the scene. Lastly, I modified my vehicle/hover controls (shown in the image above), which is my favorite and the most fun.

I've never liked these kind of "motion controls" because there is too much latency. I've only played one or two games that used the technology effectively. They worked around the low latency issues by creating a game that was slow and relaxing in-nature.

The only problem I encountered was "jerky" movement, but fortunately I found an easy fix using a Low-Pass Filter.

My device doesn't have a gyroscope so I'm not able to test those features.

So, I've learned a few things... 1) I have a few different options for controlling the player via the accelerometer. 2) Due to the latency, its best to create a game that doesn't require fast reactions or precise movement. 3) I am not able to use the gyroscope class.




<< Back to main news page


     
Fishing game updates... 3/20/2019
I succeeded in making a simple grass shader...
Fishing game updates... 3/19/2019
I worked more on the interface before going to sleep...
Fishing game updates... 3/19/2019
Started working on the shop...
Fishing game updates... 3/18/2019
I think I'm happy with the shader updates now...
Fishing game updates... 3/17/2019
I've spent the last couple days struggling with shaders...
Fishing game updates... 3/14/2019
Minor updates...
Fishing game updates... 3/12/2019
Waving shaders...
Fishing game updates... 3/11/2019
I worked more on the rope physics and made new lures...
Fishing game updates... 3/9/2019
I made a shop...
Fishing game updates... 3/7/2019
Just a few updates today...
Site created and maintained by kreediddy. © 2010-2019. kreediddy.