cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
Showing results for 
Search instead for 
Did you mean: 

Community Tip - Visit the PTCooler (the community lounge) to get to know your fellow community members and check out some of Dale's Friday Humor posts! X

Bind SwipeLeft to rotate model 90 degrees on hololens

janikows
4-Participant

Bind SwipeLeft to rotate model 90 degrees on hololens

Goal is to be able to rotate a model on hololens via voice command or swiping?

 

Im not familiar with swiping on the hololens. Is that even possible?

 

what are the steps needed to complete this on hololens?

 

Thanks Josh

 

1 REPLY 1

You can achieve this using an application parameter and some simple JavaScript. 

 

First, create a new app parameter ensuring the value is set to 0 and bind it to the desired rotation parameter. I used the Y rotation. 

AppParamRotate.png

 

In the home.js file, add the below code:

 

$scope.Rotate = function(){
  $scope.app.params.Rotate += 90;
  $scope.$applyAsync();
};

Then, on the swipeleft application event, add viewCtrl.Rotate(); 

swipeleft.png

 

Your model should now rotate 90 degrees when using the swipeleft event.

Announcements

Top Tags