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.

Newcomers DBPro Corner / Pick screen command

Author
Message
Maxx illian
21
Years of Service
User Offline
Joined: 12th May 2003
Location: United States
Posted: 26th Aug 2003 04:41
Can someone give me a rundown on the Pick Screen command. As well as the other pick commands that go with. Im having a very hard time with it. For some reason when I click the mouse on the screen my character faces the point 0,0,0 on the matrix.



*** The DT Project ***
*** Maxxillian Software ***
Maxx illian
21
Years of Service
User Offline
Joined: 12th May 2003
Location: United States
Posted: 26th Aug 2003 21:48
It figures....nobody else knows either....O well. Thats what happens when you have a new command..takes a while for people to figure out.

*** The DT Project ***
*** Maxxillian Software ***
IanM
Retired Moderator
22
Years of Service
User Offline
Joined: 11th Sep 2002
Location: In my moon base
Posted: 26th Aug 2003 22:41
You haven't used the PICK OBJECT function here, so all of the reporting functions are just reporting their default values of zero.
spooky
22
Years of Service
User Offline
Joined: 30th Aug 2002
Location: United Kingdom
Posted: 26th Aug 2003 22:51 Edited at: 26th Aug 2003 23:05
Here is how to use PICK OBJECT which is used to tell you what object is at a screen co-ordinate (mouse coord usually)

I've never used PICK SCREEN but will have a play now and knock up some code later.



[EDIT] Just edited code to place a sphere at 3d coord where mouse hits object.

The programmer formerly known as sonic
spooky
22
Years of Service
User Offline
Joined: 30th Aug 2002
Location: United Kingdom
Posted: 26th Aug 2003 23:13
OK, here is how to use PICK SCREEN. Not as useful as pick object. Imagine you are in middle of a big bubble and you point in front of you. This command will calculate position of where you will touch edge of bubble. Basically you can position an object any distance from camera by specifying screen position.



The programmer formerly known as sonic
Bulleyes
22
Years of Service
User Offline
Joined: 3rd Nov 2002
Location: Cyberjaya, Malaysia
Posted: 30th Aug 2003 09:21
What if I had a row of objects lining into the screen, let's say I have 10 spheres of the same size with the same X and Y coordinates but different Z coordinate. How do I use the pick commands to know what are the objects (more than one object) that is below my mouse cursor?

Thanks!

Bad Nose Entertainment - Where games are forged from the flames of talent and passion.

http://www.badnose.com/
IanM
Retired Moderator
22
Years of Service
User Offline
Joined: 11th Sep 2002
Location: In my moon base
Posted: 30th Aug 2003 15:15
You don't, or not easily at least.

Two things to try:

1) As you hit each object, store its number and position in an array, and then move it out of the way. Then repeat until you have no more picks. Then finally, you can put all the objects back into position using the list in the array.

2) Move the camera forward beyond the object you've identified. Repeat until you have no more picks, then reset the camera position.

Login to post a reply

Server time is: 2024-11-25 06:34:26
Your offset time is: 2024-11-25 06:34:26