"We offer new support options and therefor the forums are now in read-only mode! Please check out our Support Center for more information." - Vuforia Engine Team

Scaling Rendered Object To Cover the Found Image Target On Screen

Hi, We are trying to render an object (a toy car which is a little bit bigger than a book) on a target image on runtime. We are creating and spawning the object with "onTargetImageFound". The problem is our rendered object is too small. We need to scale the object (which we will create when target image is found), for example, same size as the found Image Target on our camera and project it, we tried giving it a static scale however the object is not resizing (naturally) when we move the camera further from the object. Is there any way to get the scale of the ImageTarget? There are two attached images one (with a tiny white point) is the original one without applying anything, second one is scaled by us with random numbers (45,10,45). Btw the object(prefab) we try to spawn is not small normally when we drag it on the scene. Thanks in advance.

Hi,

If I understand the use-case correctly, you should adjust the size in Unity to fit the Image Target. If you want to adjust the size during Run-time use https://docs.unity3d.com/ScriptReference/Transform-localScale.html with a desired UI feature (button, slider etc)

Attachment