I want an AR ViewRenderable to be placed over the real world target picture and completely fit over its boundaries. Although ViewSizer is used to change the size of AR objects, but it does it globally(sets dpPerMeter for every situation). However, I want to scale it wrt target's size,
I think something can be done by setLocalScale methods along with getExtentX and getExtentZ, but not sure how to set the parameters for my cause.
Have a look at the current code snippet :
setAnchor(image.createAnchor(image.getCenterPose()));
Node cornerNode = new Node();
cornerNode.setParent(this);
cornerNode.setLocalRotation(new Quaternion(new Vector3(1,0,0), -90));
cornerNode.setLocalPosition(new Vector3(0.0f, 0.0f, 0f));
cornerNode.setRenderable(targetImage.getNow(null));