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
0
Question by Creator347 · Feb 26, 2013 at 06:02 AM · androidcameramouseorbit

MouseOrbit resetting position

Hi, I am using MouseOrbit script for Orbitting camera in Android device to rotate the camera around cue ball in snooker. It works nice in PC builds, but when I deploy it on Android device, it takes input on touch instead of mouse movement(obviously there's no mouse). I've no problem in that.
But when I am done with change of direction and want to fine tune the movement and touch again, the camera resets to default position and I've to do the movement again. That's annoying for a user. I've tried everything I could. Can you suggest something which I should try to save the position and start from there only?

PS: My custom mouse orbit script is here.

Edit:

I've tried changing one line from this:

 var rotation = Quaternion.Euler(y, x, 0);

to this

 var rotation = Quaternion.Euler(y, x, 0)*target.rotation;

and it almost worked, now it's resetting at different rotation angle. But still the problem is same.

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 Creator347 · Feb 26, 2013 at 05:22 AM 0
Share

This question is almost similar to my problem.

1 Reply

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

Answer by Creator347 · Mar 12, 2013 at 01:31 PM

I've managed to solve this problem by deactivating the first touch. I am deactivating the first touch and save the touch position, and if the touch position changes, than the mouseorbit gets activated. Using this the problem gets sorted out.

Let me know if any of you needs the exact code.

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 crushyou · Jan 12, 2015 at 11:43 AM 0
Share

Hi @Creator347,

If you would be so kind as to post the code that worked that would be great!

I have been looking for a working swipe to orbit camera for touch screen and have not been able to make it work. This may also be due to my very beginner level. $$anonymous$$any posts from years ago ask the same question but few if any provide answers which I could get working.

Thank you

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

9 People are following this question.

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

Related Questions

Possible to use an external camera (USB) while running on Android? 1 Answer

Dragging Camera based on Touch 0 Answers

Android: Game not fitting on screen 1 Answer

Camera Size on Android 0 Answers

2D Camera (Android, Iphone) 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