- Home /
How to visualize Object with precise Size and Position
I've tried to search related issues, but I still cannot understand why this is happening.
I am creating AR application to visualize boxes using unity and vuforia. But I have problem with scale and position precision. The detail of real box sizes, in centimeters, as follows: (no). (size x, size y, size z) - (coor x, coor y, coor z)
104, 24, 70 - 0, 0, 0
104, 24, 70 - 0, 24, 0
104, 24, 70 - 0, 48, 0
104, 24, 70 - 0, 72, 0
104, 48, 14 - 0, 70, 104
104, 48, 14 - 0, 48, 70
Since the scale is too big for unity, I scale down everything by divided it with 100. so I got following number:
1.04, 0.24, 0.7 - 0, 0, 0
1.04, 0.24, 0.7 - 0, 0.24, 0
1.04, 0.24, 0.7 - 0, 0.48, 0
1.04, 0.24, 0.7 - 0, 0.72, 0
1.04, 0.48, 0.14 - 0, 0.7, 1.04
1.04, 0.48, 0.14 - 0, 0.48, 0.7
I checked the inspector, the numbers are same. And because i divided it as float number, I also Debug.Log the result, it was rounded. I dont know whether its matter or not. However, if I draw manually, everything is normal. But Unity shows it different. I dont understand why there is gap in Z coordinate. Can anyone suggest me what should I do? Where I did wrong?
Btw, my hierarchy boxes is not parent child nested relationship. it just plain hierarchy.