List
Allow user defined camera for pose calculation
Posted Date: 2018-08-14 14:29     Edited Date: 2018-08-16 5:26     Writer: inactive

Hey there, this post here is a suggestion to the MAXST team rather than a question, but anyone is more than welcome to comment.

Basically, from one day to the other it seemed like the target recogniction simply decided to call it quits and stop working.

I couldnt remember changing anything at all, but after a couple hours of hair pulling and debugging, I finally saw something was triggering a nullreference.

Upon further inspection, I found out it was one of the SDK classes - Trackable, to be more specific, at "GetPose()". ILSpy revealed to me that "Camera.main" from Unity is being used, and this was the problem: my camera was not tagget "MainCamera" so nothing was found.

Well, after that little story, I want to propose MAXST expose this to developers, either as a field within the settings where one can specify a tag or (which would be preferable to me) on a per-scene basis, through a field in a script where the camera may be directly referenced.

But in the meantime - or if such thing is not feasible for some reason - a simple check for null before using Camera.main that logs something like "No Camera tagged MainCamera found" could help lots of users in the future ;)

Posted Date: 2018-08-16 5:26     Edited Date: 2018-08-16 5:26     Writer: inactive

Yes, we will accept your suggestion and sorry for making you having trouble.

Thank you.

Jack, SDK support team