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 DeveshPandey · Dec 26, 2013 at 07:23 AM · draggingmouse drag

How to drag mouse on circular arrow

Hi Guys,

I want to achieve a functionality describe below:

  • I want to drag mouse on arrow in curve form (see attached image)
    alt text

  • I want to know length/position (0-1 meter) of mouse on the arrow while dragging

  • Mouse should not goes out side the arrow while dragging, if possible.

Please help me to achieve this functionality, how can I do this?

Thanks in advanced :)

sample.png (6.6 kB)
Comment
Add comment · Show 7
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 DeveshPandey · Dec 26, 2013 at 10:56 AM 0
Share

Guys, I am waiting for your great comments...

avatar image ozturkcompany · Dec 26, 2013 at 11:03 AM 0
Share

I didn't quite understand what you are trying to do?

avatar image DeveshPandey · Dec 26, 2013 at 11:25 AM 0
Share

1). I want to drag mouse from right(0 meter) to left(1 meter) within the arrow by following dotted line 2). Now, suppose length of dotted line is 1 meter and I have dragged mouse from right most corner of dotted line(0 meter) to half of length of dotted line, then position of mouse will be 0.5 meter away from right corner of the dotted line, I need this value i.e 0.5,

Are you getting me what I need, if not, then I can explain you more.

avatar image ozturkcompany · Dec 26, 2013 at 11:28 AM 0
Share

Oh, are you trying to calculate the distance within an arrow path from your start point which is 0 meter in that manner.

avatar image ozturkcompany · Dec 26, 2013 at 11:34 AM 0
Share

what i don't understand in your statement "$$anonymous$$ouse should not goes out side the arrow while dragging, if possible." Since you are moving the mouse isn't it really up to you?

Show more comments

1 Reply

· Add your reply
  • Sort: 
avatar image
0

Answer by baci · Dec 26, 2013 at 11:37 AM

If I understood correctly, you want to drag something visually along a given line? I suggest taking the mouse coordinates input and approximate the closest value on the curve, to display the mouse cursor there. For example, if the curve would be a straight horizontal line, just display the cursor on the x value of the mouse position and the y value of the line.

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 DeveshPandey · Jan 02, 2014 at 07:42 AM 0
Share

Exaclty,this logic is also in my $$anonymous$$d but how can I calculate mouse position along with dotted curve, that is the problem. Is There any formula to calculate that?

Also keep in $$anonymous$$d, given angle of arrow is not original, it may vary according to our need :)

I am looking for better way to do this.

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

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

Related Questions

Dragging a GameObject with mouse 1 Answer

Prevent object from jumping to center point when dragging starts 1 Answer

Drag and Drop causes oblject to disapear 0 Answers

Following instruction for drag and drop 3d object unity but not working 1 Answer

Making scrollview single-direction while allow dragging parent in other diration 2 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