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 richardzzzarnold · Apr 11, 2011 at 09:20 PM · camerarotationmousetouchorbit

Touch mouseorbit

Hi I am using MouseOrbit.js on iPhone but am experiencing a problem in that whenever you touch the screen it instantly changes camera rotation to a new position dictated by finger screen position relative to camera target. I am wondering how to adjust it so that touching the screen does not instantly affect the camera position, but a touch swipe does. I want the new starting touch position to retain the cameras last position. Basically, I want to be able to make a series of side swipes ( say from left to right ) to smoothly rotate the camera around the target. As it is now, the first swipe rotates it but as soon as i touch the left side of the screen again in order to swipe again, the camera position abruptly changes to a radical new location which makes it all a bit messy. I am sure there is something on UnityAnswers about this but I just cant locate it.Thanks.

Comment
Add comment
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

5 Replies

· Add your reply
  • Sort: 
avatar image
0

Answer by ghart · Jul 30, 2011 at 02:33 AM

Hi. Did you ever find a good solution? I have the same issue. Thanks.

Comment
Add comment · 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
0

Answer by cj_coimbra · Aug 25, 2011 at 06:04 PM

Try catching the initial touch position in TouchPhase.Began Then move it only in TouchPhase.Moved or Stationary with Quaternion.Lerp(...) method between that initial position and the current touch position. Tweak the rate of the move so it fit your needs.

Comment
Add comment · 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
0

Answer by cj_coimbra · Aug 25, 2011 at 06:04 PM

Try catching the initial touch position in TouchPhase.Began Then move it only in TouchPhase.Moved or Stationary with Quaternion.Lerp(...) method between that initial position and the current touch position. Tweak the rate of the move so it fit your needs.

Comment
Add comment · 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
0

Answer by ElMouse · Sep 30, 2011 at 11:41 AM

I am experincing absolutely the same problem and its driving me CRAZY O_O

On pc everythyng works fine, but when i launch app on android, it looks like the position variables are misbehaving on touch somehow...

Comment
Add comment · 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
0

Answer by richardzzzarnold · Oct 19, 2011 at 07:53 AM

I couldnt work out how to do a TouchPhase.Began adjustment as suggested by cj.coimbra but I made a decent substitute by adding TouchLook script to an object that was then parented to the target object ( camera target ) and then making the camera a child of the touchlook target.

Comment
Add comment · 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

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

4 People are following this question.

avatar image avatar image avatar image avatar image

Related Questions

Mouse Orbit snapping issues 0 Answers

Mouse Orbit snapping issues 0 Answers

Smooth camera rotation on mobile and pc when GetMouseButton()? 0 Answers

Freeze Camera Rotation that is attached to the object in certain moments 0 Answers

help with my orbit camera script 0 Answers


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