- Sort Posts
- 9 replies
- Last post
Is there a way to disable stage redeployment after first click?
Is there a way to disable stage redeployment after first click?
Add these two lines of code to the DeployStageOnce script and see screenshot
public GameObject PlaneFinder;
if (anchor != null)
{
AnchorStage.transform.parent = anchor.transform;
AnchorStage.transform.localPosition = Vector3.zero;
AnchorStage.transform.localRotation = Quaternion.identity;
AnchorStage.SetActive(true);
PlaneFinder.SetActive(false);
}
Attachment | Size |
---|---|
![]() | 166.4 KB |
Is there a way to disable stage redeployment after first click?
Hi Andrei,
I still have not gotten plane finder to work the way I want. I was just positing what I thought Sunny might have been talking about. I think that we are all trying to do similar things- namely spawn one object and then make it tappable or draggable or whatever. I asked Vuforia staff to take a look at our 3 posts. So maybe they will shed some light. In the meantime, you could try changing GameObject Set Active to PlaneFinderBehaviour Bool enabled and uncheck it and see if that helps? For me the scripts aren't editable- they don't open in MonoDevelop but in TextEdit and looked garbled, as if they are already compiled I guess. So unfortunately, I am not much help!
Attachment | Size |
---|---|
![]() | 123.21 KB |
Is there a way to disable stage redeployment after first click?
@AgentArgyle
Thanks for the screenshot! I tried the GameObject.SetActive option and when I deploy and open the app, the square retacle dissapears as soon as I tap the screen and the 3D object does not spawn anymore. The only way to get the square retacle back is by restarting the app.
I tried this with both the ContentPositioningBehaviour script as well as the DeployStageOnce script. Are you editing something in the scripts also, or just in the Inspector tab?
If it's not too much to ask, could you post a screenshot of your entire Inspector window :D ?
-Andrei
Attachment | Size |
---|---|
![]() | 166.57 KB |
Is there a way to disable stage redeployment after first click?
Is there a way to disable stage redeployment after first click?
I think Sunny means doing something like this:
Attachment | Size |
---|---|
![]() | 14.11 KB |
Is there a way to disable stage redeployment after first click?
Hello and ty for the post.
I am encountering the same issue. I want to add Lean Touch controls to our AR app but when I try to interact with the object it just dissapears. I figure it has something to do with the object getting re-spawned each time I tap the screen, therefore conflicting with the Lean Touch inputs.
Where did you assign the SetActive Plane FInder to "false"? In the DeployStageOnce script? Or somewhere in the Inspector interface?
Andrei
Adding those two lines did not solve the issue for me on Unity 2017. It seems as though the tap is never registered, given that the plane finder box stays there when I tap.