Start a new topic

UNITY PLUGIN 1.2.1-1.1.0 update

UNITY PLUGIN 1.2.1-1.1.0 update


mmm, then it's weird because if you do change the FOV value of the Wikitude camera then the triggers are not working properly anymore. That means that somehow that number is used somewhere?

 

I did the same test on the example project, simple target tracking and it didn't affect. Perhaps it is some issue with culling, rather than tracking. Would it be possible to check if the target is actually lost by placing some logs in the script that handles events from TrackableBehaviour? In the sample application, the equivalent script would be ToggleTrackable, and make sure they are linked to events in TrackableBehaviour. It might help tracking down this issue.

Yeah I placed those logs and the tracker was not lost but both objects (my 3d model and my 3d UI) disappeared, so I think it's somehting related to the frustum culling. That said sometimes the tracker was getting lost if the movement was too fast or if the camera lost focus.

Thank you for confirming the issue. I will definitely look into ways we can update the camera so it behaves properly in the editor. In the mean time, maybe you could try disabling the frustum culling by increasing the size the bounds of the meshes. Unfortunately, Unity doesn't seem to offer any proper way to disable frustum culling, at least as far as I know, but hopefully we will fix the issue soon.

Thanks for your answer. To update the bounds of the meshes do you mean increasing the collider size in the editor?

No, I'm afraid it's a bit more complicated.

At runtime, you would have to find all MeshFilter components, access the mesh variable and change the bounds value there. Something like this:

foreach (var meshFilter in GetComponentsInChildren<MeshFilter>()) {
   var newBounds = meshFilter.mesh.bounds;
   newBounds.size *= 2.0f;
   meshFilter.mesh.bounds = newBounds;
}

You would do this once, in Start, on the root object. In the example project, this can be the ToggleTrackable script.

You can also look at this blogpost for more info, but keep in mind that the example there won't work properly as is because the forward of the Wikitude camera is not pointing the right direction. I hope this will also get fixed soon. Sorry for the inconvenience, but I hope this will get it working.
Login or Signup to post a comment