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 moghes · Dec 10, 2014 at 01:43 PM · raycastdragnguimultitouchtap

Touch with 2 fingers makes conflict with 2 different components.

Hello,

I need to explain a bit more in details since the title doesn't make anything clear.

So I have a puzzle game, where 4 puzzle pieces are arranged one on top of the other (different NGUI depths). please check the picture attached.

I am using NGUI, on the Pieces I have the script "ExampleDragDropItem" attached, on the slots (not visible in the scene, since they are transparent sprites located I have "UIDragDropContainer" attached and EmptyGameObject with "UIDragDropRoot" attached. (All scripts are offered by NGUI and I have'nt created anything for the drag and drop process.

Whenever I Tap on any piece, I change the depth of the sprite so that the current (selected) piece appears on top.

I have disable multitouch from NGUI camera.

However there are cases where I tap with 2 fingers and strange results happened (Puzzle fit in wrong place).

As I display/print touch count, it prints 1 but in some rare cases where each method (raycast vs ngui) recognize different touches (fingers).

In this case, ill be dragging piece 2, but hit.transform returns piece 1 (which will refuse to fit in the accurate slot)

I figured it out that the raycast has recognized finger #1, while NGUI recognizing the other finger, hence the puzzle is sitting in the wrong place.alt text

I tried different solutions, but what solutions do you recommend?

Thanks

puzzleproblem.jpg (151.1 kB)
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

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.

Follow this Question

Answers Answers and Comments

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

Related Questions

Touch dont work 1 Answer

Drag multiple object using multitouch? 1 Answer

How to block dragging if collider hits 1 Answer

Help changing plane.Raycast dragging script 1 Answer

Raycast for touch 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