Sorry your browser is not supported!

You are using an outdated browser that does not support modern web technologies, in order to use this site please update to a new browser.

Browsers supported include Chrome, FireFox, Safari, Opera, Internet Explorer 10+ or Microsoft Edge.

Dark GDK / A way to select enemies

Author
Message
haYnguy
16
Years of Service
User Offline
Joined: 5th Jun 2008
Location: on my island
Posted: 28th Jun 2008 15:46
i'm trying to get it so that when someone clicks an enemy is 3d space, a little box appears around it to denote it being selected. How do I get this to happen?

-- from my island, aloha wau 'ia 'oe --
jezza
16
Years of Service
User Offline
Joined: 8th Mar 2008
Location: Bham, UK
Posted: 28th Jun 2008 16:26
I had some code that did this, but I overwrote it. Clever old me. Actually mine was a drag box, not clicking. that worked by converting the 3d coordinates of an object into 2d screen ones, then checking if it was inside the box that was drawn with the mouse.
Probably a much better way of doing this, but i would run a function after a click that converts ever object's coordinates into 2d scre en ones, then make an imaginary box using that and check whether the moue coordinates are ithin that box. The size of the box would be dependent on dbObjectSize and distance from the camera
Diggsey
18
Years of Service
User Offline
Joined: 24th Apr 2006
Location: On this web page.
Posted: 28th Jun 2008 20:51
dbPickObject ?

Yuor signutare was aresed by a deslyxic mud...
Curious? CLICK HERE!
Zuka
16
Years of Service
User Offline
Joined: 21st Apr 2008
Location: They locked me in the insane asylum.
Posted: 28th Jun 2008 23:00
tobi543(?) posted some code.

jason p sage
17
Years of Service
User Offline
Joined: 10th Jun 2007
Location: Ellington, CT USA
Posted: 30th Jun 2008 20:48
yeah this was already answered in another thread - pickobject is the dilly silly.

jezza
16
Years of Service
User Offline
Joined: 8th Mar 2008
Location: Bham, UK
Posted: 1st Jul 2008 15:20
Forgot about pick object. my bad :S

Login to post a reply

Server time is: 2024-09-30 01:31:10
Your offset time is: 2024-09-30 01:31:10