• 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.

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

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

Need Help, Rotating a wheel with touch or using the mouse 2 Answers

How to smoothly rotate camera around an object with touch 1 Answer

Mouse/Wacom stylus drag not working. 1 Answer

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