Log in or register to post comments

attach gameobject and keep its original size

May 17, 2014 - 4:50am #1

i've tried to create AR application, and sometimes i have to change my image target(my marker) because with tracking issue.

i try to add 2 image target(ImageTarget1 and ImageTarget2) into scene and drag a gameobject(3D file) into each image target, but the size of game object in imageTarget1 is different with the size of game object in ImageTarget2.

and then my question is how to set or keep the original size of my prefab after load into scene?

i've successfully load and parenting my prefab into ImageTarget at runtime(by script) but i don't know how to keep its original size(prefab) if i change my ImageTarget with different size of ImageTarget.

the attached image shows the problem

AttachmentSize
Image icon Capture.JPG63.75 KB

attach gameobject and keep its original size

November 2, 2014 - 10:36pm #3

Hi,

I want solution for the same. If you have figured it out, I will be very grateful to you you would share the solution for the same....

 

Thanking you

 

attach gameobject and keep its original size

May 19, 2014 - 3:16am #2

If your imageTargets are different sized, then that is why your content is a different size as they will be relevantly the same size in relation to the parent (image target). Check the localScale of each object and they will be the same. 

If you want the content to remain the same size regardless of the image targets size then you will need to add it to the scene/instantiate it on it's own and then parent it to the target afterwards, altering the position through code/in the editor, but not the scale. 

Log in or register to post comments