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

Community Tip - When posting, your subject should be specific and summarize your question. Here are some additional tips on asking a great question. X

How to highlight part by using 2D button

NP_10149671
8-Gravel

How to highlight part by using 2D button

Hello community,

 

I am beginner on vuforia Studio.

I have developed ball shooting system project. In this project, I put model item on ball and swivel angle. (Below, I attach screenshot of developed project screen please check out this.) Now, I want to highlight the parts by using 2D button. Can anyone please tell me how should I do this?

 

Thanks and regards,

Nilam 

ACCEPTED SOLUTION

Accepted Solutions

Hello @NP_10149671 ,

 

There are ways to achieve this, when you say you want to highlight the part do you mean you just wish to change the color or you also want to apply some shader to it.

If you want to simply change the color you can use the below code and call the function at respective 2D-button

 

$scope.colorchange = function(){

$scope.setWidgetProp('modelItem-1', "color", "rgba(255,0,0, 1)");
}

 

If you wish to apply shader, you can refer this link : https://community.ptc.com/t5/Vuforia-Studio/TML-widget-X-ray-shader/m-p/603526

 

Hope this helps

 

BR,

Mohit

View solution in original post

1 REPLY 1

Hello @NP_10149671 ,

 

There are ways to achieve this, when you say you want to highlight the part do you mean you just wish to change the color or you also want to apply some shader to it.

If you want to simply change the color you can use the below code and call the function at respective 2D-button

 

$scope.colorchange = function(){

$scope.setWidgetProp('modelItem-1', "color", "rgba(255,0,0, 1)");
}

 

If you wish to apply shader, you can refer this link : https://community.ptc.com/t5/Vuforia-Studio/TML-widget-X-ray-shader/m-p/603526

 

Hope this helps

 

BR,

Mohit

Announcements

Top Tags