Log in or register to post comments

smartterrain scale factor at runtime

August 19, 2014 - 1:17am #1



I'm implementing smart terrain to our game. In order to maek smart terrain properties recognize properly I need to properly set scale factor.

So I need to ask user how large print is he using and accordign his selection I need to set scale factor and tehn start smart terrain tracker.

this is what I'm doing 


var tracker = TrackerManager.Instance.GetTracker<SmartTerrainTracker>();
//set smart terrains size factors
foreach (ImageTargetBehaviour it in  FindObjectsOfType<ImageTargetBehaviour>())
	tracker.SetInitializationTarget	(it.ImageTarget,new Vector3(-100,0,-60),new Vector3(100,0,60),terrainScale);	

How ever it doe snot work.

Does not give any error.

I can see in the log

mockup set as Smart Terrain initialization target.
prototype set as Smart Terrain initialization target.

which are 2 image targets in the scene and logs are result of SetInitializationTarget calls.

but smart terrain is not being analyzed. Nothing is drawn. If I comment out SetInitializationTarget call then all works as expected and smart tterrain is being detected.

Can you help me out with this one please?



smartterrain scale factor at runtime

August 20, 2014 - 12:23pm #2

What ever I do I cannot make this work.

whenever I set setinitializationtarget, whether it is more of them or only one whcih is currently tracking, I always get message that the trackble was set as initialziation target in console, but smart terrain cannot be started. I can call stop, stopmeshupdates, reset, then starting or anythign it just does not output anything anywhere and smart terrain does not start.

When I getinitializationtarget info bounds and scale are reported back as I set it... Just how to start it?

I even tried different approach to extend ImageTargetAbstractBehaviour and make a setter for mSmartTerrainScaleToMM..

so I can set it programatically but that doesn't change anything even I change it before startign SmartTerrainTracker

Is it a bug in Vuforia SDK or is there something I'm missing?



Log in or register to post comments