Wayback Machinekoobas.hobune.stream
May JUN Jul
Previous capture 14 Next capture
2021 2022 2023
2 captures
13 Jun 22 - 14 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 RajOTS · Jun 02, 2021 at 04:21 AM · touchtouch controlslean

LeanTouch Move Prefabs Separately

I'm trying to use the Rotate/Scale/Translate scripts on a prefab, when I instantiate multiples of that prefabs, they are all moving at the same time when I touch the screen. Is there a way to separately distinguish the gameobject I want to choose to move with LeanTouch.

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

3 Replies

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

Answer by RajOTS · Jun 02, 2021 at 02:10 PM

I was actually able to figure this out using this document (https://learn.unity.com/tutorial/manipulating-objects-in-ar-with-lean-touch?uv=2019.4#604e822bedbc2a0d3ecc53cc).


Basically make sure you have the LeanTouch gameobject in your hierarchy, it must have LeanTouch. Lean Select By Finger and Lean Finger Down scripts on the gameobject. Then add a trigger on the Lean Finger Down script on the On Finger (LeanFinger) section. The trigger should be the LeanSelectByFinger.SelectScreenPosition.


Then on your prefab or gameobject that you want to manipulate, make sure you have the Lean Selectable By Finger script on the object. (I have the Pinch Scale, Rotate Axis, Drag Translate and Select By Finger scripts on my prefab)

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 unity_5LLwj0pKsGYSHw · Apr 19 at 10:11 AM 0
Share

Your answer is very useful! I have 9 gameobjects in my scene. When I select the first object, I can drag this object only. However, when selecting the second object, the first object moves as well. Next, when selecting the third object, all three objects move, etc.

I think the problem is that my Lean Selectable does not have an option 'Deselect On Up' as shown in the Unity Documentation. I don't know how to 'unselect' the gameobjects in another way.

My Lean object contains: Lean Touch, Lean Finger Down, Lean Select By Finger. There is a trigger on Lean Finger Down (LeanSelectByFinger.SelectScreenPosition. My gameobjects contain: Lean Drag Translate and Lean Selectable By Finger (I don't want to rotate/scale them). The Lean Drag Translate contains the AR Camera.

avatar image
1

Answer by unity_MXGApNcapNfNLg · Jun 02, 2021 at 10:07 AM

@RajOTS Add LeanSelectable component to your objects and follow the documentation accordingly.

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 Noor23 · Jun 02 at 12:36 PM

@rajots I have followed what you’ve said but still objects move together , HELP!

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

150 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 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 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 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 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 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

Help with LeanTouch not working 0 Answers

How to get intermediate swipe positions? 1 Answer

How to get multitouch input using EasyTouch 0 Answers

Flip Sprite with SpriteRenderer.flipX Issue 0 Answers

Working with screen's touch limit 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