Gestures to Place, Move, Rotate, and Scale Multiple Objects in AR Unity - XR Interaction Toolkit

Sdílet
Vložit
  • čas přidán 31. 07. 2024
  • In this AR Foundation tutorial, you will learn how to implement tap to place multiple objects with plane tracking in Augmented Reality without writing any code. You will also learn how to use gestures to move, rotate, and scale the spawned objects. This tutorial uses AR Foundation and XR Interaction Toolkit.
    Gesture details:
    • Single-finger drag gesture to move or rotate
    • Two-finger twist gesture to rotate
    • Two-finger pinch gesture to scale
    🔗 Links:
    XR Interaction Toolkit doc: docs.unity3d.com/Packages/com...
    Basic setup video: • Basic Setup for AR Fou...
    ⏰ Timestamps:
    0:00 Intro
    0:21 Project setup
    0:32 Add XR interaction toolkit
    0:53 Scene setup
    1:40 Add AR gesture interactor
    2:30 Add plane tracking
    3:20 Add AR placement interactable
    4:05 Add move gesture
    5:32 Add rotation gesture
    6:00 Add scale gesture
    6:41 Result
    7:22 Outro
    AR Foundation is a cross-platform framework for Augmented Reality development in Unity that supports ARCore on Android and ARKit on iOS.
    XR Interaction Toolkit provides a set of scripts that make it easy to add common interactions to your AR experiences.
    💡 CC is available. Please feel free to send any questions, comments, suggestions, or feedback.
    🌐 Connect:
    Patreon: / xiennastudio
    Twitter: / xiennastudio
    Discord: / discord
    Donate: ko-fi.com/xiennastudio
    #unity3d #augmentedreality #arfoundation #arcore #arkit #madewithunity #gamedev

Komentáře • 58

  • @xiennastudio
    @xiennastudio  Před 9 měsíci +5

    Correction: In 5:16, please hide the selection game object in the prefab so it won't show up when the object is spawned. My apologies for missing this.

  • @aiyewatughu6082
    @aiyewatughu6082 Před 9 měsíci +2

    Please keep the tutorials coming. These are amazing!

  • @aiyewatughu6082
    @aiyewatughu6082 Před 9 měsíci

    Oh my goodness. This is amazing. This exactly what I have been looking for. Thanks Xienna. Subscribing now!.

    • @xiennastudio
      @xiennastudio  Před 9 měsíci +1

      Thank you so much for your kind words and for subscribing! 😄

  • @adrianolopizzo9556
    @adrianolopizzo9556 Před 9 měsíci

    This is amazing Xienna. Keep up!

  • @manuelmeekattukulam
    @manuelmeekattukulam Před 3 měsíci

    Thanks a lot! Very informative

  • @bogdanshulman8081
    @bogdanshulman8081 Před 6 měsíci

    Great tutorial !

  • @rubz5706
    @rubz5706 Před 9 měsíci

    Thank you 💫

    • @xiennastudio
      @xiennastudio  Před 9 měsíci

      No problem 😊

    • @rubz5706
      @rubz5706 Před 7 měsíci

      where can I get or how can I create that outline circle@@xiennastudio

  • @nandasulaeman7796
    @nandasulaeman7796 Před 6 měsíci

    hello, i have been using ar foundation 4, but i want to upgrade them to ver 5. but i have condition with spawning object with AssetBundle. how to use ar placement interactable with assetbundle ?

  • @APRILJOYLUCAS
    @APRILJOYLUCAS Před 4 měsíci

    Hello is there a way to create many insertable prefabs instead of one? currently creating my own training visual app thank you! Love hearing from you soon

  • @noupo
    @noupo Před 7 měsíci

    Are there any ways to delete selected object with a button?

  • @mahirrehman2013
    @mahirrehman2013 Před 2 měsíci

    hy i wanted i ask how do we created ar placment interactable in ar foundation i was not able to find any resousrce to do it could suggest some help

  • @tanjiahou9006
    @tanjiahou9006 Před 2 měsíci

    @xiennastudio how if I want to spawn only just one object? thank you! Urgent :(

  • @GDSC_CIU
    @GDSC_CIU Před 7 měsíci

    Hii. Your video is just perfect. In your next video can you teach how to turn off the Plane Prefab when the 3d object is placed on the ground(How to Disable and Enable AR Plane Detection). Then I think our program would be more perfect. Many thanks in advance.

    • @GDSC_CIU
      @GDSC_CIU Před 7 měsíci

      Or you can answer how to do it in the comment?

  • @karanoli4914
    @karanoli4914 Před 8 měsíci

    Hey! Thanks a ton for the tutorial. Could you please tell how can I improve the quality of the plane detection. I use a powerful android device still the plane detection is very poor, vertical planes are never detected horizontal planes are hardly being detected and they start moving as I move the camera :') Should I switch to an apple device once ? or if there's anything which would help please let me know . Thank you so much for the tutorial again :D

    • @xiennastudio
      @xiennastudio  Před 8 měsíci

      Hi, yes, Apple's camera is better at tracking, but have you tried it on different locations? Your environment may not be suitable for plane detection. ARCore plane detection is not really good at detecting reflective surfaces, complex backgrounds, and low light conditions. Make sure that your environment is well-lit and free of reflective surfaces.
      Also, make sure in AR Plane Manager to put 'Everything' in the Detection Mode variable so you can track vertical planes.
      And try to update your Unity version as some versions have bugs forum.unity.com/threads/ar-foundation-5-poor-stability-and-drift-even-in-samples.1390011/#post-9160778

  • @sean1276
    @sean1276 Před 9 měsíci

    hi, I'm new to unity. can you explain more on the outline? How to import outline to use with the project?

    • @xiennastudio
      @xiennastudio  Před 9 měsíci

      Hi, just drag and drop the outline image you want to use to Unity.

  • @KhangHuynh-oc6ye
    @KhangHuynh-oc6ye Před 9 měsíci

    Hi. Can you please guide on how to delete the selected object?
    I'm new to the XR Interaction Toolkit.

    • @noupo
      @noupo Před 4 měsíci

      We have the same problem, have you found the solution?

  • @blendersoy
    @blendersoy Před 8 měsíci

    could be possible test it with XR simulator? or only with a device?

    • @xiennastudio
      @xiennastudio  Před 8 měsíci +1

      Hi, you can test some of the single-touch gestures, such as spawning, selecting, and moving objects, in XR Simulation. To do this, first use the Scene view to move around the scene and track the plane. Then, switch to Game view to test the single-touch gestures. However, for multi-touch gestures like rotation and scaling, you'll need to test your app on an actual device.

  • @SiTupaiPintar
    @SiTupaiPintar Před 8 měsíci

    wow!!! that's an amazing tutorial, but I have an issue, how if Iwant to spawn only just one object? thank you!

    • @xiennastudio
      @xiennastudio  Před 8 měsíci

      Thank you! The XR Interaction Toolkit's basic scripts only support spawning multiple objects. If you need to spawn only one object, you can disable the Placement script after spawning it. However, you will still need to select the object to interact with it. I'm still working on implementing spawning one object and interacting without needing to select it.

    • @afterlife1578
      @afterlife1578 Před 7 měsíci

      @@xiennastudio hi, love your videos. is there any update on this? I want to spawn 1 object and interact with it as well

  • @rickyarmanda575
    @rickyarmanda575 Před 8 měsíci +1

    Very Good Video 😁, Can it only display one object when clicked and not display a new object when clicking in a different area?

    • @xiennastudio
      @xiennastudio  Před 8 měsíci +1

      Thank you! The XR Interaction Toolkit's basic scripts only support spawning multiple objects. If you need to spawn only one object, you can disable the Placement script after spawning it. However, you will still need to select the object to interact with it. I'm still working on implementing spawning one object and interacting without needing to select it.

    • @shahnoorraza8514
      @shahnoorraza8514 Před 8 měsíci

      Hi @@xiennastudio. Your tutorials have been very helpful and I really appreciate the efforts you put in for quality work. I'm also waiting for your tutorial on spawning single object and scaling, rotating and translating single object.

  • @user-ch6xf7ef8y
    @user-ch6xf7ef8y Před 8 měsíci +1

    My phone is OPPO Reno7 Z 5G but when I put apk into my phone can enter but no camera,allI can see is dark

    • @xiennastudio
      @xiennastudio  Před 8 měsíci +1

      Hi, is your device from China? Based on ARCore supported lists, OPPO Reno7 Z 5G is not supported with ARCore if it's from China developers.google.com/ar/devices#android_china

    • @user-ch6xf7ef8y
      @user-ch6xf7ef8y Před 8 měsíci

      @@xiennastudio I take my mom's oppo reno10 pro but it is black again,could you sand your apk to me,let me try it, please,thank you

    • @SomethingWOW0
      @SomethingWOW0 Před 8 měsíci

      you can check your camera permission once. @@user-ch6xf7ef8y

  • @giuseppedeluca809
    @giuseppedeluca809 Před 4 měsíci

    Hi! I loved the tutorial but I do have a problem with the prefabs Interaction Manager and XR Origin reference. I follow your steps at 4:27, but when I create a prefab by dragging it in the project window, it loses the references. Consequently, I can't interact with the spawned items. Any idea on how to fix?

    • @xiennastudio
      @xiennastudio  Před 4 měsíci

      Hi! Losing the reference is fine, as Unity will automatically add the reference when we play the scene. Did you try it on your device or just in the Editor?

    • @giuseppedeluca809
      @giuseppedeluca809 Před 4 měsíci

      @@xiennastudioI tried in both editor and building the app on Android, but the result is the same. It just keep losing the reference :(

    • @xiennastudio
      @xiennastudio  Před 4 měsíci

      Can you send a screenshot or video when you test in the Editor? You can send it through Email xiennastudio@gmail.com or Discord discord.gg/tuGM3zBg

    • @giuseppedeluca809
      @giuseppedeluca809 Před 4 měsíci

      @@xiennastudioSure, I'll send it asap. Thanks a lot!

    • @giuseppedeluca809
      @giuseppedeluca809 Před 4 měsíci

      @@xiennastudio I sent an email with a screen capture. Thanks for your help!

  • @Rick_roll_offl
    @Rick_roll_offl Před 3 měsíci

    B - 10 mates like here...🤓

  • @souhaila1202
    @souhaila1202 Před 9 měsíci

    the visualisation gameobject appears in instanciation (before i select one object to move it)! why ?

    • @xiennastudio
      @xiennastudio  Před 9 měsíci

      I apologize for forgetting to mention in the video that you must hide the selection game object in the prefab to prevent it from appearing when you spawn the prefab. Thank you for bringing this to my attention!

    • @_AANgurahGdDhananjaya
      @_AANgurahGdDhananjaya Před 8 měsíci

      @@xiennastudio how do i hide selection game object? i'm new at unity AR

    • @xiennastudio
      @xiennastudio  Před 8 měsíci

      First, select the selection game object. Then in the Inspector, there is a checkmark symbol on the left side of the game object name. Click on that to remove the checkmark. Now the game object is hidden.@@_AANgurahGdDhananjaya

  • @aiyewatughu6082
    @aiyewatughu6082 Před 9 měsíci

    Hi Xienna! Could you create a tutorial on how to hide and unhide text or information in Unity using the XR Interaction toolkit? So from your previous tutorial, instead of spawning an object when you click on the screen, you unhide hidden text and then hide them back when screen is tapped again.

    • @xiennastudio
      @xiennastudio  Před 9 měsíci +1

      Hi, thanks for the suggestion! By text do you mean the text that stays on the screen, or text that is in a 3D space?

    • @aiyewatughu6082
      @aiyewatughu6082 Před 9 měsíci

      @@xiennastudio text in 3D space.

    • @aiyewatughu6082
      @aiyewatughu6082 Před 9 měsíci

      @@xiennastudio thanks for responding. I truly appreciate it.

    • @xiennastudio
      @xiennastudio  Před 9 měsíci +1

      Sorry, just want to confirm a few more things: Instead of a Cube, the text will be spawned where the user taps on the screen? Do you want to be able to rotate and resize the text too?

    • @aiyewatughu6082
      @aiyewatughu6082 Před 9 měsíci

      Hi @@xiennastudio thanks so much for responding and please no need to be sorry, your work is amazing and it's an honour to follow and learn from your content. To answer your question, the text is spawned be beside the cube and it can be scaled as well. Plus, when the user interacts with the cube like rotating, scaling, or translating; the text follows along as well.
      Thanks so much!

  • @Adroitbit
    @Adroitbit Před 8 měsíci

    It can't scale individual axis 😢
    Well that's a good video nonethless.