Community Tip - You can Bookmark boards, posts or articles that you'd like to access again easily! X
I am using tml3dRenderer.GetObject($scope.currentSelection).GetWidget().GetLocation().position.x to get x coordinate of a selected model item on click of a button. This piece of code works in preview mode but in Ipad it throws "GetObject()" method not found. Is this an issue with vuforia view or with ipad? Any other workaround for them? My code is as below -
var xPos;
var yPos;
var zPos;
if (twx.app.isPreview() == true) {
tml3dRenderer.setColor($scope.currentSelection, PICK_COLOR);
xPos.push(parseFloat(tml3dRenderer.GetObject(partId[i].modelItem).GetWidget().GetLocation().position.x));
yPos.push(parseFloat(tml3dRenderer.GetObject(partId[i].modelItem).GetWidget().GetLocation().position.y));
zPos.push(parseFloat(tml3dRenderer.GetObject(partId[i].modelItem).GetWidget().GetLocation().position.z));
}
}
else {
tml3dRenderer.setColor($scope.currentSelection, PICK_COLOR);
xPos.push(parseFloat(vuforia.GetObject($scope.currentSelection).GetWidget().GetLocation().position.x));
yPos.push(parseFloat(vuforia.GetObject($scope.currentSelection).GetWidget().GetLocation().position.y));
zPos.push(parseFloat(vuforia.GetObject($scope.currentSelection).GetWidget().GetLocation().position.z));
}
Hello vradhan2019,
Kind regards,
Lorena