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

tml3dRenderer.GetObject throws method not found error in IPAD and hololens

vradhan2019
2-Guest

tml3dRenderer.GetObject throws method not found error in IPAD and hololens

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));
}


1 REPLY 1
lgherman
13-Aquamarine
(To:vradhan2019)

Top Tags