• 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 /
This post has been wikified, any user with enough reputation can edit it.
avatar image
0
Question by abhishakverma · Jan 23, 2014 at 06:10 AM · camerajavascriptrotation

camera rotation

i am facing one problem with Input.acceleration. if i rotated the camera in y axis in runtime then my Input.acceleration work opposite direction.how can Move the Object to Camera respective.

 var dir : Vector3 = Vector3.zero;
 dir.x = -Input.acceleration.y;
 dir.z = Input.acceleration.x;
Comment
Add comment · Show 3
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 rutter · Jan 23, 2014 at 03:22 AM 0
Share

Could you explain what you're trying to do in more detail?

avatar image abhishakverma · Jan 27, 2014 at 02:19 PM 0
Share

i want to create two button left and right movement of the camera if i press left button camera rotate 180 degree in left side in y axis and other buttton work same in right side but mobile acceleration work according to the moobile direction it should not work in opposite direction when we rotate the camera.

avatar image Nanobrain · Jan 27, 2014 at 02:45 PM 0
Share

Still not 100% clear here. So, what you're trying to say is that the left button and right button rotate the camera in the wrong direction?

0 Replies

· Add your reply
  • Sort: 

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.

Welcome to Unity Answers

The best place to ask and answer questions about development with Unity.

To help users navigate the site we have posted a site navigation guide.

If you are a new user to Unity Answers, check out our FAQ for more information.

Make sure to check out our Knowledge Base for commonly asked Unity questions.

If you are a moderator, see our Moderator Guidelines page.

We are making improvements to UA, see the list of changes.



Follow this Question

Answers Answers and Comments

20 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 avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image

Related Questions

Move the Object to Camera respective. 1 Answer

"Perfect" Free Rotation Method? (like Blender) 2 Answers

I need help with camera movement and rotation. 1 Answer

How Can I Stop Rotation From This Script? 0 Answers

Look at wont update? 2 Answers

  • Anonymous
  • Sign in
  • Create
  • Ask a question
  • Spaces
  • Default
  • Help Room
  • META
  • Moderators
  • Explore
  • Topics
  • Questions
  • Users
  • Badges