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
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