Game Development Community

Object picking

by Harrison Brock · in Torque Game Engine · 07/08/2008 (7:28 pm) · 4 replies

I'm using TGE 1.5.2

I'm looking to add a engine change so I could do something like this:

1. Left-click on a Object
2. Pop-up a GUI when I click on the object.

Could someone help me with this. I did find some stuff but it was real old.

Thanks

#1
07/09/2008 (1:05 am)
Not sure what you found that was old but have you looked at the object selection resource at www.garagegames.com/index.php?sec=mg&mod=resource&page=view&qid=7335
#2
07/09/2008 (4:27 am)
Just some pointers. It only works on the collision meshes. If you need to do it on triangle/triangle strips. Have a look here:

http://tdn.garagegames.com/wiki/Material_Based_Effects_-_General_Support_Functions
http://tdn.garagegames.com/wiki/Material_Based_Effects_-_Detection_-_shapeBase_Derivatives

note: it's for the tgea, so the materialslists are somewhat different.
#3
07/09/2008 (10:29 am)
The one andy pointed to is good, as is Rubes additions to it for first-person selection and object highlighting.

Rubes' resource:
http://www.garagegames.com/index.php?sec=mg&mod=resource&page=view&qid=10359

You will need to do this one as well:
http://www.garagegames.com/index.php?sec=mg&mod=resource&page=view&qid=11518

I did a basic implementation of it last week for a client working on an educational game.

EDIT: Fixing my links!
#4
07/09/2008 (10:53 am)
Thanks for the help.