Pick

Share your ZGE-development tips and techniques here!

Moderator: Moderators

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

Pick

Post 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
Attachments
Pick.zgeproj
(4.11 KiB) Downloaded 1069 times
User avatar
jph_wacheski
Posts: 1005
Joined: Sat Feb 16, 2008 8:10 pm
Location: Canada
Contact:

Post by jph_wacheski »

Nice! Does this method work on Android?
iterationGAMES.com
User avatar
Kjell
Posts: 1911
Joined: Sat Feb 23, 2008 11:15 pm

Post 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
User avatar
jph_wacheski
Posts: 1005
Joined: Sat Feb 16, 2008 8:10 pm
Location: Canada
Contact:

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