16
Support / reproject question
« on: July 12, 2011, 04:45:52 am »
Hello, this is my first time programming anything in android.
I'm not sure why im having this problem but maybe you can help me. When I do the below code it seems to keep adding the object at the center of the screen instead of where i click/touch. Am I using this method incorrectly?
I'm not sure why im having this problem but maybe you can help me. When I do the below code it seems to keep adding the object at the center of the screen instead of where i click/touch. Am I using this method incorrectly?
Code: [Select]
SimpleVector dest = new SimpleVector(0, 0, 0);
dest=Interact2D.reproject2D3DWS(cam, fb, (int)xpos, (int)ypos);
Object3D newObj = Primitives.getBox(5f, 5f);
newObj.setOrigin(dest);
world.addObject(newObj);
newObj.strip();
newObj.build();