Page 1 of 1

Pick

Posted: Fri Aug 24, 2012 2:26 pm
by Kjell
8)

For those that don't want to bother with raycasting octrees & affine transformed meshes, attached is a oldskool picking trick. Handy for certain ( 3D ) board / strategy / touch games.

K

Posted: Sat Aug 25, 2012 1:06 pm
by jph_wacheski
Nice! Does this method work on Android?

Posted: Sat Aug 25, 2012 2:09 pm
by Kjell
Hi jph,

Haven't tried it myself, but it should work yes ( on both ES 1.1 and 2.0 ). However, keep in mind that glReadPixels is quite slow, so you probably don't want to use this technique with multi-touch / multiple queries.

K

Posted: Fri Aug 31, 2012 1:57 pm
by jph_wacheski
humm,. I could not get it working,. seems the multi-pass rendering is not supported on android? not sure, the multi-pass demo [RenderPass.zgeproj] does not work, but that uses render targets as well,. .

anyway, this is a rather clever and useful way to get object selection in ZGE,. I would put it to use on android for some unit selection in a tactics type game idea I have,. perhaps I will do it for PC instead, since this works great currently. cheers.