Hi everyone, In my wikitude app, which is using the latest phonegap plugin, I'm displaying a HtmlDrawable object on top of my tracker image. When I set the width to a small value, the virtual content is displayed just on top of the marker image, which is great. But in order to show my virtual content in its real size, I set the width to a large value, (it's about 80 SDUs). Then the virtual content is really near to the camera instead of just on top of the tracker image. Why? How can I change the distance? Shouldn't drawable object contents be displayed on top the tracker image? Thanks.
almost 5 years ago
the unit SDU for a target image is defined as follows:
1 SDU is equal to the height of the target image.
In your case, setting it to 80 means the HTMLDrawable is 80 times the size of the target image's height. Which makes it huge. It does not however change the distance!
I'm not sure what you mean by: "in order to show my virtual content in its real size". If you can clarify that I might be able to help you on giving you more help on setting the right width.
over 4 years ago
Along a similar line ...
Is it possible to change the scale an object in the AR when the user has only moved a very short distance (e.g 400m)?
From what I understand, scaling is related to the cutoff_min (10m) and the cutoff_max (20kms). If the cutoff_max is reduced will the image decrease in size "faster" as the user moves away from the object?
Thanks - this was probably a stupid question but I'm very new at this.
over 4 years ago
you are right if you decrease the cutoff_max the objects will decrease in size "faster".
There are 3 properties that define how objects are scaled. I've included the explanation from the documentation belwo, just let me know if I need to clarify anything.
scene.maxScalingDistance - float
The distance, in meters, at which objects will keep their size on the screen even when the user moves further away. If the user is further than maxScalingDistance, the object will not appear any smaller than the size it took on at maxScalingDistance. Must be a positive number.
Default Value: 20000
scene.minScalingDistance - float
The distance, in meters, at which objects will start to appear smaller on the screen when the user moves further away. If the user is closer than minScalingDistance, the object will not appear any bigger than the size it took on at minScalingDistance. Must be a positive number.
Default Value: 10
scene.scalingFactor - float
The amount of scaling that is applied between minScalingDistance and maxScalingDistance. The scalingFactor controls the size the object takes on at maxScalingDistance, in percentage of the size it took on at minScalingDistance.
Must be in the range of .
Set the scalingFactor to 1 if no scaling should be applied for the objects.