By elecman
on Sat, 01/26/2013 - 16:33
Vuforia SDK Version: vuforia-unity-android-ios-2-0-30.unitypackage -
Description with steps to reproduce: If this code is used to create an Image Target at runtime, the scale is set incorrectly for the game object in Unity:
string dataSetName = "QCAR/ImageTargets.xml";
DataSet.StorageType storageType = DataSet.StorageType.STORAGE_APPRESOURCE;
dataSet = imageTracker.CreateDataSet();
dataSet.Load(dataSetName, storageType);
imageTracker.ActivateDataSet(dataSet);
StateManager stateManager = TrackerManager.Instance.GetStateManager();
foreach(TrackableBehaviour tb in stateManager.GetTrackableBehaviours()){
tb.gameObject; //the scale of this game object is 200, which is incorrect -
Development OS (Mac OS X, Windows, Linux): W -
Mobile OS and Version: NA -
Mobile Device Manufacturer and Model name: NA -
Do the Vuforia Sample Applications show the same behavior?:
Incorrect scale set by ImageTarget
Hi, you mention a DataSet called "ImageTarget.xml"; what is the target size (width and height) specified there ?
do you observe the same size (always 200) no matter what the size is in Image Targets ?
Incorrect scale set by ImageTarget
The target size is this:
<ImageTarget size="0.27 0.171563" name="0"/>
I didn't try other sizes in the XML file yet but this bug is repeatble. I emailed the latest beta of UCS to David Beard. Let me know if you would like to have it as well.
Incorrect scale set by ImageTarget
Hi, thanks for the details.
(and no need to send me the UCS project, I can ask David, thanks.)
Incorrect scale set by ImageTarget
Hi elecman,
I just tried to reproduce the issue, but I did not manage to get your erroneous behavior:
Incorrect scale set by ImageTarget
The internal scale is indeed correct but have to click on the game object in the Hierarchy window in the editor for this bug to show up.
Incorrect scale set by ImageTarget
Hi, there is a step that I miss; if I create the target programmatically (at run-time), I will not see it in the Editor...
Incorrect scale set by ImageTarget
Weird.I do see it in the Editor if I generate it in code. As far as I understand, a marker (image target or frame marker) is a game object with an ImageTargetBehaviour or MarkerBehaviour script attached to it. By defenition, game objects are visible in the Editor in Unity.
Incorrect scale set by ImageTarget
Sorry, I was testing on device (while in PlayMode I do see the new targets);
you're right, the issue is showing up, the scale is incorrectly set to 200;
I've brought this to the team (like the other ones you spotted), we are looking into it.
Incorrect scale set by ImageTarget
Quick update: the issue has been solved. The fix should be available with the next maintenance release (expected soon).
Incorrect scale set by ImageTarget
Great! Hopefully the bug resulting in code generated frame markers not being detected will be resolved in that release as well.
Incorrect scale set by ImageTarget
Yes. The fix for the other bug you mentioned is also expected in the same release.
Incorrect scale set by ImageTarget
Hi Elecman,
quick updtae: Vuforia 2.0.31 is out. It should include the fix for the Incorrect scale issue.
Incorrect scale set by ImageTarget
Thanks. It works now.