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

Christmas scene... 12/24/2018
In the spirit of Christmas, I created a snowy scene and dropped in the new motion controls...
Motion Controls updates... 12/23/2018
I updated the vehicle controls demo...
Android motion controls... 12/22/2018
I worked more on the "fly-around" motion controls.
Euphorica updates published... 12/13/2018
After working on updates for a couple weeks, I've published the latest version of Euphorica for my patrons.
Euphorica updates... 12/12/2018
Even more updates and improvements to Euphorica...
Euphorica updates... 12/10/2018
More updates and improvements to Euphorica...
Euphorica updates... 12/9/2018
More updates to the Euphorica project...
Euphorica updates... 11/26/2018
I resurrected the Euphorica project...
What now? 10/28/2018
I am constantly conflicted between wanting to make something realistic versus something simple and stylish. I have so many different versions of this project now... its silly.
Improved Gem Shader... 10/28/2018
I updated the gem/crystal shader again...
Site created and maintained by kreediddy. © 2010-2019. kreediddy.