Search Unity

  1. Good news ✨ We have more Unite Now videos available for you to watch on-demand! Come check them out and ask our experts any questions!
    Dismiss Notice
  2. Ever participated in one our Game Jams? Want pointers on your project? Our Evangelists will be available on Friday to give feedback. Come share your games with us!
    Dismiss Notice

Struggling with ARCore move/rotate/resize (LeanTouch) No coding background, struggling.

Discussion in 'ARCore' started by Mumford-and-Dragons, Mar 12, 2019.

  1. Mumford-and-Dragons

    Mumford-and-Dragons

    Joined:
    Jan 5, 2016
    Posts:
    116
    Hi there

    I have spent nearly all day and only a little progress has been made so any here is greatly appreciated! :)

    I have successfully built the HelloAR demo onto my OnePlus 6 Android phone. It displays the planegenerator and I can spawn lots the models.

    I have installed LeanTouch from the Asset Store but I can't understand how I can implement this with the ARCore demo!? Many/all tutorials online show that you have to add your asset/mesh in the Unity Hierarchy, then add the LeanTouch components to the model to get the move, rotate and resize working; and this works! This actually works. Here is the video to show you!: > https://imgur.com/LP6MqDF
    This shows the LeanTouch code that I have applied to the model that I added into the hierarchy: https://imgur.com/qVw1g8h

    ------------------------
    But I don't want to automatically have the mesh in the scene when I open the AR app.
    Basically what I want to know/understand/create is;

    -Spawn only one mesh on the Plane Generator
    -Rotate/move/scale the object. Basically what it shows here https://developers.google.com/ar/develop/unity/tutorials/object-manipulation-sample

    I am no coder by any means. I have heard of functions, variables etc, and have briefly worked with C#. I attempted to look through the code that the HelloAR demo uses, to see how I can 'only spawn 1 object', 'add rotation' etc, but I couldn't understand it.

    Please could I get some help/assistance with this.
    Thank-You
     
  2. uchiha-umesh

    uchiha-umesh

    Joined:
    Feb 19, 2019
    Posts:
    1
    Hey Hi,

    I also not a C# programmer and facing same issues, like not being able to manipulate spawned object in AR session, but I figured out the solution. You just need to add the collider to your spawn mesh in it's prefab.
    That way you not only will be able to manipulate the object but also can select the previously spawned object.

    If you don't know how to add collider mesh to game object, check out this video link.


    I am also trying to figure out how to spawn only one object in AR, but no luck so far.
    If by any chance you already figured it out please let me know.

    Thank you!
     
unityunity