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


     
Unity Post-processing Stack... 2/23/2019
Unity replaced its post-effects a while ago, but I haven't used them yet, until today...
Labyrinth game updates... 2/20/2019
I made minor updates to the user-interface, backgrounds, etc...
New backgrounds... 2/19/2019
I added a couple new backgrounds...
Added a sliding menu... 2/17/2019
I made a simple menu, but decided not to use it...
Updates... 2/14/2019
I added one more level to the new labyrinth game...
New level... 2/13/2019
I just added another level...
Graphics... 2/13/2019
I started working on graphics for the logo, splash screen, and icon.
Labyrinth game updates... 2/11/2019
I added two new levels...
Adding sound... 2/9/2019
I started adding sound to the game...
New game experiment... 2/7/2019
I worked more on the box maze experiment...
Site created and maintained by kreediddy. © 2010-2019. kreediddy.