Opengl-es picking object
- by lacas
I saw a lot of picking code opengl-es, but nothing worked. Can someone give me what am I missing?
My code is (from tutorials/forums)
Vec3 far = Camera.getPosition();
Vec3 near = Shared.opengl().getPickingRay(ev.getX(), ev.getY(), 0);
Vec3 direction = far.sub(near);
direction.normalize();
Log.e("direction", direction.x+" "+direction.y+"…