- Sort Posts
- 4 replies
- Last post
Re: Where is the target center?
April 8, 2011 - 2:27pm #4
Thanks.
So if I need to establish a specific origin on a trackable, that is offset from the center of the bounding rectangle for the image, would it be best to accomplish this when rendering, or to redesign the image target for this center?
For instance, lets say that I am using a teardrop shape with this outline..
but I want the origin of the trackable to be in the center of the bulb region (i.e. shifted down relative to the orientation above).
It should be pretty easy to translate your rendered content in code, once you come up with the correct X, Y offsets. Measure your target and find the point you want to be the "world center." Find the X, Y offsets from the center of the target, percents will probably be most useful here. Then in code you can find the virtual width and height of an image target using ImageTarget::getSize(), and use those percents to translate the rendered content.
- Kim