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


     
PATREON RESOURCES/LINKS 10/28/2023
PATREON RESOURCES/LINKS
Tropical Scene 8/1/2023
I made a tropical scene in Unity, just for fun.
Skybox AI 6/26/2023
I heard about this AI skybox generator and did a few tests in Unity.
Bobsled Game 3/7/2022
I recently watched the olympic bobsled event and got inspired to make a bobsledding game...
3D Viewer 1/1/2022
I made a simple program in Unity for viewing my 3d objects.
New 3d scene... 8/10/2021
A new scene I made in Blender3D...
Blender... 8/3/2021
I made some trees...
3d scene... 7/27/2021
A landscape scene I made in Blender...
Blender grass... 7/16/2021
An updated image of the different types of grass I made in Blender.
Grass... 7/14/2021
Different styles of grass...
Site created and maintained by kreediddy. © 2010-2024. kreediddy.