Pick

Share your ZGE-development tips and techniques here!

Moderator: Moderators

Post Reply
User avatar
Kjell
Posts: 1715
Joined: Sat Feb 23, 2008 11:15 pm

Pick

Post by Kjell » Fri Aug 24, 2012 2:26 pm

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
Attachments
Pick.zgeproj
(4.11 KiB) Downloaded 468 times

User avatar
jph_wacheski
Posts: 1005
Joined: Sat Feb 16, 2008 8:10 pm
Location: Canada
Contact:

Post by jph_wacheski » Sat Aug 25, 2012 1:06 pm

Nice! Does this method work on Android?
iterationGAMES.com

User avatar
Kjell
Posts: 1715
Joined: Sat Feb 23, 2008 11:15 pm

Post by Kjell » Sat Aug 25, 2012 2:09 pm

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

User avatar
jph_wacheski
Posts: 1005
Joined: Sat Feb 16, 2008 8:10 pm
Location: Canada
Contact:

Post by jph_wacheski » Fri Aug 31, 2012 1:57 pm

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.
iterationGAMES.com

Post Reply