Reset scaling of models in image target in unity and vuforia

前端 未结 2 1150
情书的邮戳
情书的邮戳 2021-01-29 01:11

I\'m using Vuforia and unity for my AR App. which has more than 2 models/image targets. To zoom in and out I used Lean Touch. But the problem is both will get zoom on pinching .

2条回答
  •  Happy的楠姐
    2021-01-29 02:10

    Your method doing the scaling, add :

    if(this.gameObject.activeSelf == false){ return; }
    // Scaling process
    

    So if you run the code on all objects, only the active ones will be affected. Considering you deactivate the object on lost tracking.

提交回复
热议问题