Open GoogleCodeExporter opened 8 years ago
You can find some examples how to do it in the setup classes. Here is a code
snipped how you can do it:
Obj obj= new Obj();
MeshComponent imageMesh = GLFactory.getInstance().newTexturedSquare(
"uniqueImageId",
IO.loadBitmapFromId(myTargetActivity, R.drawable.icon));
imageMesh.addAnimation(new AnimationFaceToCamera(camera, 0.5f));
obj.setComp(imageMesh);
The addAnimation(..) stuff is useful if you want the image to always face the
camera
Original comment by simon.heinen
on 5 Jun 2011 at 8:49
Original comment by Alexande...@gmail.com
on 30 Jun 2011 at 11:19
in the
imageMesh.addAnimation(new AnimationFaceToCamera(camera, 0.5f));
where is camera instantiated? I get an error there
Original comment by lordxy...@gmail.com
on 23 Aug 2011 at 10:22
The camera you need is a GLCamera and you have to create it on your own if you
are using the normal Setup class. If you are using the DefaultARSetup class you
can get the camera object by calling getCamera() inside your setup class. The
best thing would be to take a look at the implementation of DefaultARSetup. The
camera is needed when a new World object is created and you need it every time
when the position in the virtual world (like facing a mesh to the user) is
relevant.
Original comment by simon.heinen
on 24 Aug 2011 at 9:01
Original issue reported on code.google.com by
joanpuig...@gmail.com
on 4 Jun 2011 at 10:23