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.

DarkBASIC Discussion / 3D Mouse Select on an Locked Object

Author
Message
=C=
22
Years of Service
User Offline
Joined: 8th May 2003
Location: United Kingdom
Posted: 25th Sep 2003 14:43
Yet another Mouse Question. This time I have hit wall so I am looking for inspiration...

What I have is:
A 3D object with Limbs. It is locked on the screen so when my flyer flies about this always appears as an 'instrument' on my screen.

I also have a small bitmap working as a mouse. It is smooth moving and knows boundaries (code available on codebase). It is locked on too so it always appears as part of the 3D instrument.

Both being locked on, I can not use Screen X() and screen Y() to compare where the pointer is in comparison with the 3D object on the screen.
Idealy it should detect if it is on a limb and change the color of that limb, thus selecting it.

What i think happens is, the objects are always where I first created them, because I have the lock on, and when my flyer moves around, although the 'instrument' looks like it is 'there' it is actually back where it was created the 1st place... this makes the screen x() and screen y() completely useless...

For this, the code works perfect on a demo without the camera moving, but once I add it into my flyer it looses completely!

Any other ideas? The projectile collision test seems to be an overkill and I haven't tried it yet... but do please suggest anything!!! ideas!

Ideally i would like to find a mathematic formula that projects 3d coords on a 2D environment, 'ignoring' the Z axis for instance... not sure there is one tho, seems to simplistic...

-------------------------------
Pointy birds, Oh pointy pointy
Anoint my head, Anointy 'nointy
Ravey
Retired TGC Developer
22
Years of Service
User Offline
Joined: 2nd Nov 2002
Location: Southern TGC Nerve Centre
Posted: 25th Sep 2003 15:15
why not use pick object?

Regards,
Dave Milton
Check out my games: Diode, Root, Binman & Skateboard Crazy
=C=
22
Years of Service
User Offline
Joined: 8th May 2003
Location: United Kingdom
Posted: 25th Sep 2003 15:24
Which command is this exactly? Never heard it before!
or are you describing a method?

confused

-------------------------------
Pointy birds, Oh pointy pointy
Anoint my head, Anointy 'nointy
Digital Sun
21
Years of Service
User Offline
Joined: 26th Jul 2003
Location: Italy
Posted: 25th Sep 2003 15:37
Pick object is a DBpro command and not a DB Classic one, so =C=, you can't use it. Sorry.
=C=
22
Years of Service
User Offline
Joined: 8th May 2003
Location: United Kingdom
Posted: 25th Sep 2003 16:53
Still I can find a way of replicating the effect, All I need is inspiration. I also have DBPro but I am too scared to use it.
But then again I am scared of escalators...

-------------------------------
Pointy birds, Oh pointy pointy
Anoint my head, Anointy 'nointy
=C=
22
Years of Service
User Offline
Joined: 8th May 2003
Location: United Kingdom
Posted: 25th Sep 2003 16:58
Again thanks guys for the info but will pick objetc work on a locked object when the camera is in motion? It should I think since there is not ties with the screen object. To coint he oo phrase...

-------------------------------
Pointy birds, Oh pointy pointy
Anoint my head, Anointy 'nointy

Login to post a reply

Server time is: 2025-05-21 02:22:14
Your offset time is: 2025-05-21 02:22:14