Game Development Community

Picking

by Cliff · in Torque Game Engine · 07/01/2006 (4:47 pm) · 12 replies

Howdy.

I've seen Click'n'Pick, and have read some articles about the hoops folks had to jump through to get it to work with 1.2 and 1.3, and I was just wondering...

Is there a more up-to-date resource on picking that applies to 1.4? Seems like the newest resources I can find on picking are over a year old, and I'm concerned about jumping through a lot of hoops to get it working if there might be a resource available that my searching didn't turn up.

I know that the RTS pack is supposed to support picking, but I'd rather not pay for the entire pack just for picking... especially with the RTS pack being 1.3.

Any tips at all would be most appreciated.

#1
07/02/2006 (12:14 am)
I have RTS pack and it works perfect. I would go with the RTS pack because theres a great tutorial that shows you step by step on how to covert it to ver. 1.4 code but do you really need version 1.4 for what you are trying to do thats what I would think about.
#2
07/02/2006 (12:47 am)
It's less about whether or not I need 1.4 and more about the fact that since I'm starting out with a fresh project, I'm inclined to want to be up-to-date.

I've actually been digging into trying to figure out how the picking works when in Editor mode and see if I can use that picking.
#3
07/02/2006 (10:35 am)
The root algorithm for picking is quite basic:

--find the mouse pointer's 2D coordinates
--project those 2D coordinates into the 3D world space
--do a short range containerRadiusSearch (c++ version, that's a ConsoleMethod) and see if anything is nearby
--return a list of objectID's that were collided with, and/or the one that is "on top" depending on how you set up your radius search criteria

While not a solution for you, hopefully keeping the above in mind during your research will help clear things up--the editor code has a lot of editor type implementation that sometimes can confuse the root functionality you are looking for.
#4
07/02/2006 (10:38 am)
Thanks. What I've got now is a HEAD with Click'n'Pick merged in. Haven't had a chance to test it out yet, just finishing up the patching now.
#5
07/03/2006 (2:50 pm)
The object selection resource (http://www.garagegames.com/index.php?sec=mg&mod=resource&page=view&qid=2173) works fine in stock TGE 1.4 if that one doesn't work out for you.
#6
07/03/2006 (4:18 pm)
Thanks, John! The merge of click'n'pick didn't work out for me, so this should help a lot!
#7
07/07/2006 (11:50 am)
I wrote an update for that resource recently, too. You can find it here.
#8
07/07/2006 (11:59 am)
In the end, what I've got merged into my code base is Dave's picking. I don't have TLK, but yours sounds nice, Rubes.

I'm wondering how much effort it will take to get it merged into TSE when we upgrade to it.
#9
07/07/2006 (12:02 pm)
TLK is not required for that resource, it just contains a little bonus for identifying selected objects which uses TLK.
#10
07/07/2006 (12:21 pm)
The contents of this resource is only available to owners of the products listed below.
If you do own one of these products please make sure you are signed in to the site.

* Products:Torque Lighting Pack
#11
07/07/2006 (1:21 pm)
Wow, I didn't realize they put that stipulation on. It's only required for the very last (non-essential) part, so perhaps they would reconsider. Thanks...
#12
07/07/2006 (1:33 pm)
Glad I could help. Thanks for chiming in on this thread!