I have made vuforia scene in which 5 cubes get activated when target is found . (all 5 cubes from one target)
I want to know the position of different cubes to instantiate a object at center of cube. But when I am trying I am getting weird positions.
The cube transform.position is different than transform.local position // and when I am instantiating at these positions, the object is getting instantiated at completely different position.
Any one facing this issue?
transform.position and transform.localPosition will be different. transform.position are global coordinates, and transform.localPosition is the object’s position relative to it’s parent. Since your cubes will be a child of your image target, you should use local position to instantiate the objects. If you mean you want the objects at the origin of your cube, you should be able to set their local position to the same exact position as your cubes, since once an object is a child of another, the Transform of the inspector pane will display local coordinates.