Wayback Machinekoobas.hobune.stream
May JUN Jul
Previous capture 13 Next capture
2021 2022 2023
1 capture
13 Jun 22 - 13 Jun 22
sparklines
Close Help
  • Products
  • Solutions
  • Made with Unity
  • Learning
  • Support & Services
  • Community
  • Asset Store
  • Get Unity

UNITY ACCOUNT

You need a Unity Account to shop in the Online and Asset Stores, participate in the Unity Community and manage your license portfolio. Login Create account
  • Blog
  • Forums
  • Answers
  • Evangelists
  • User Groups
  • Beta Program
  • Advisory Panel

Navigation

  • Home
  • Products
  • Solutions
  • Made with Unity
  • Learning
  • Support & Services
  • Community
    • Blog
    • Forums
    • Answers
    • Evangelists
    • User Groups
    • Beta Program
    • Advisory Panel

Unity account

You need a Unity Account to shop in the Online and Asset Stores, participate in the Unity Community and manage your license portfolio. Login Create account

Language

  • Chinese
  • Spanish
  • Japanese
  • Korean
  • Portuguese
  • Ask a question
  • Spaces
    • Default
    • Help Room
    • META
    • Moderators
    • Topics
    • Questions
    • Users
    • Badges
  • Home /
avatar image
1
Question by lucax · Dec 02, 2012 at 04:12 PM · androidcontrolaccelerometertiltfly

Using accelerometer-tilt to control a flying orb

Hello, Been long since I used Unity, nice to be back C:

Anyways, I am trying to control an orb which is already set to fly towards some target. I want to control it using the accelerometer, assuming the device is held parallel to ground and the home button is on the right side.

I would want that when player tilt the phone up the orb should go up and when tilted down it should go down same with the other axis, when tilted left shall go left and tilted right the orb shall go right.

I would like a small help on how to implement this and also how to configure the axes. Thanks :D

Comment
Add comment · Show 1
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users
avatar image lucax · Dec 03, 2012 at 09:21 AM 0
Share

anyone ? :/

2 Replies

· Add your reply
  • Sort: 
avatar image
3
Best Answer

Answer by Caiuse · Dec 03, 2012 at 09:54 AM

this answer should get you started.

by the way, always have a little search through Unity Answers before posting a question. Most questions have already been asked and answered.

Comment
Add comment · Show 1 · Share
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users
avatar image AlucardJay · Jun 23, 2014 at 08:58 AM 1
Share

$$anonymous$$ore info for future readers :

  • Accelerometer example : https://www.assetstore.unity3d.com/en/#!/content/8566

  • Accelerometer tutorial : http://unity3d.com/learn/tutorials/modules/beginner/platform-specific/accelerometer-input

  • Accelerometer Scripting Reference : http://docs.unity3d.com/ScriptReference/Input-acceleration.html

avatar image
-2

Answer by dilmer · Sep 12, 2013 at 06:59 AM

Check out this control I wrote which may help you out.

Guys,

I worked in a game recently which needed an accelerometer control for a spaceship I created which is now available in the App Store as well, during my programming I found myself using this control for other games. I would recommended as is super easy to integrate into your game.

Download Now from the Asset Store

alt text

Comment
Add comment · Show 1 · Share
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users
avatar image harryoui · Jun 23, 2014 at 07:49 AM 1
Share

At least attempt to answer the question if you're going to advertise like that.

25$? Yeesh.

Your answer

Hint: You can notify a user about this post by typing @username

Up to 2 attachments (including images) can be used with a maximum of 524.3 kB each and 1.0 MB total.

Follow this Question

Answers Answers and Comments

12 People are following this question.

avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image

Related Questions

How to make camera position relative to a specific target. 1 Answer

Face Direction of Tilting 1 Answer

Tilt control for jump 0 Answers

Android Tilt controls help 1 Answer

Hi .... i made a pc game controls work fine....how do i use accelerometer for android...for ex if i wanna move right i tilt right...etc 1 Answer


Enterprise
Social Q&A

Social
Subscribe on YouTube social-youtube Follow on LinkedIn social-linkedin Follow on Twitter social-twitter Follow on Facebook social-facebook Follow on Instagram social-instagram

Footer

  • Purchase
    • Products
    • Subscription
    • Asset Store
    • Unity Gear
    • Resellers
  • Education
    • Students
    • Educators
    • Certification
    • Learn
    • Center of Excellence
  • Download
    • Unity
    • Beta Program
  • Unity Labs
    • Labs
    • Publications
  • Resources
    • Learn platform
    • Community
    • Documentation
    • Unity QA
    • FAQ
    • Services Status
    • Connect
  • About Unity
    • About Us
    • Blog
    • Events
    • Careers
    • Contact
    • Press
    • Partners
    • Affiliates
    • Security
Copyright © 2020 Unity Technologies
  • Legal
  • Privacy Policy
  • Cookies
  • Do Not Sell My Personal Information
  • Cookies Settings
"Unity", Unity logos, and other Unity trademarks are trademarks or registered trademarks of Unity Technologies or its affiliates in the U.S. and elsewhere (more info here). Other names or brands are trademarks of their respective owners.
  • Anonymous
  • Sign in
  • Create
  • Ask a question
  • Spaces
  • Default
  • Help Room
  • META
  • Moderators
  • Explore
  • Topics
  • Questions
  • Users
  • Badges