Good day to all of you!
We would like to create an AR sample app using the Vuforia Ground Plane feature. We specialize in Archviz but we use UE4 for our daily driver, so my knowledge of Unity and C# is fairly limited.
Firstly, I have managed to successfuly go through the Ground Plane tutorial and deployed an Android app where I can place our 3D object in the detected space. I have also replaced the Content Positioning Behaviour script with the Deploy Stage Once script in order for the object to be spawned in only one location and in only one instance.
This is where I am now. But the final app should contain the following functionalities:
1) Spawn the 3D object automatically without tapping the screen (or possibly create a UI button that will spawn it?) or disable the respawn on the 2nd tap of the screen;
2) Add scale functionality using 2 finger gestures; (Lean Touch)
3) Add rotate functionality in only 1 axis using 2 finger gestures; (Lean Touch)
The main issue I am encountering happens after I add the Scale and Roate scripts into the 3D object (child of the Ground plane stage). Because both the 3D object spawning and the functionalities rely on touch input, once I open the app on a Galaxy S8+ and register the first tap of the screen, nothing happens. In this example at 5:40 sec into the video (https://www.youtube.com/watch?v=EUxiW_7W8rw&t=55s) the person talks about adding a UI button which can stop the ground detection feature and he reffers to the ARkit example script called "HitTest". Is there a similar procedure / example script for Vuforia?
I have found an example on this forum explaining how to disable the stage redeployement after the first tap (https://developer.vuforia.com/forum/ground-plane/there-way-disable-stage-redeployment-after-first-click), but after editing the DeployStageOnce script and assigning the SetActive Plane finder to "false", nothing happens. I build the app and it does not even register the first tap anymore in order to spawn the object. Even if the Lean Touch scripts are not added yet. Prehaps I don't need to edit the script and there is an option built-in the Unity interface?
It makes sense to me that once you stop the Ground Plane from registering the input, you can freely use the Lean Touch functionalities without taking the 3D object out of the screen. BUT, having that you initially need to tap the screen one time in order to place the object I was thinking to proably make it so that the 3D object spawns automatically once you are in the app? This, or make it so that Lean Touch inputs can only be registered after the ground detection feature is disabled? I have found many examples regarding Vuforia + Lean Touch, but most of them focus on the Image Target feature :( What are your thoughts?
Some other small issues include not being able to walk around and behind the 3D object once it is spawned. The object moves/shakes slightly on the screen when I move the phone and dissappears at one point before ending up behind it. And I cannot add another object on the plane afterwards, I need to restart the app in order to do so.
In the same ARkit example at 2:02 sec (https://www.youtube.com/watch?v=EUxiW_7W8rw&t=55s) he talks about adding a ShadowPlanePrefab under the HitCubeParent. Is there a similar procedure / example for Vuforia?
I apologize for the long post :) I am aware that I am missing some of the fundamentals required when developing in this environment, so feel free to post any links to tutorials/videos/basics that you think are needed for my case. I am sure plenty of you have hit a smiliar "wall" during your development, so your expertise is invaluable.