Community Tip - Your Friends List is a way to easily have access to the community members that you interact with the most! X
Hi,
I am currently working on getting my feet wet with Vuforia Studio and am trying to reimplement a Usecase from Unity within Vuforia Studio.
I am now curious about the limitations of Vuforia studio. The usecase is an AR app for the Microsoft Hololens augmenting a machine, showing a customized 3D UI, that allows the user to interact with 3D buttons and the machine itself. (This is currently implemented with Unity and Vuforia SDK)
As far as i have seen now, Studio has events for hololens gestures like holding, doubletap, swiping, but i cannot seem to get a normal "click" working. The JS field for "click" on a model itself doens't seem to be triggered by a hololens click ?!?
Am I missing something? Is it possible to interact with the scene and its models (colliders), buttons, etc. like it is in Unity?
Can i get REST Api calls from a Vuforia studio javascript function or do i need to have Thingworx composer running in the background for that?
(I am currently only working with the trial version, which has a composer, but I cannot create any new things etc, because of restricted permissions)
The default Home.js is the place where all javascript functions are stored. is there a possibility to create a second file to reduce the size of that single file and to tidy up things a little bit?
Can't we select multiple objects in the Editor, or group them together, so you can reposition multiple elements all at once? (also having a shared pivot point for multiple objects by grouping would be handy too)
And final question. is there a nice documentation available for all the keywords used ike $scope, $element etc. and how to use it properly?
Solved! Go to Solution.
Indeed, I was missing something. I made an error invoking the function not properly. Clicking 3D widgets with the Hololens works as intended now.
Indeed, I was missing something. I made an error invoking the function not properly. Clicking 3D widgets with the Hololens works as intended now.
Yes clicking on 3d widget works fine.
But another approach is to have a second model loaded which will implemented your 3d UI.
So for example an assembly which display a board with different buttons. So you can define a button as modelitem and use the modelitem click event so when you click on the button.
Additionaly when you click the button you can moved it in one direction so it should implements "pressed" status or after some delay it could move back to the original possition.
In same case if required you can hide or show some part of you UI according your requirements.
Thanks for the idea of implementing the UI as an actual 3D model with model-items. That is a workaround i could live with.
Also thank you for the tip with loading a js file from the resources.
I will have a look at the angularJS GET POST documentation link you provided an will try to reimplement my Get requests from my Thingworx trial within studio.
Sounds like you got the click figured out. As for the rest of your questions I'll take a stab.
$scope.loadJSON = function (file, callback) { var xobj = new XMLHttpRequest(); xobj.overrideMimeType("application/json"); xobj.open('GET', file, true); xobj.onreadystatechange = function () { if (xobj.readyState == 4 && xobj.status == "200") { // Required use of an anonymous callback as .open will NOT return a value but simply returns undefined in asynchronous mode callback(xobj.responseText); } }; xobj.send(null); } $scope.loadJSON("app/resources/Uploaded/fileName.json", function (response) { // this is the file to load partsJSON = JSON.parse(response); console.log('parts JSON loaded:', partsJSON); $scope.app.fn.addSnackbarMessage('Parts data Loaded'); console.log($scope.app); }