Community Tip - Did you get an answer that solved your problem? Please mark it as an Accepted Solution so others with the same problem can find the answer easily. X
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
Solved! Go to Solution.
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
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