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 / Pick Object problem using GDK.NET? Help!

Author
Message
Greg Bassett
16
Years of Service
User Offline
Joined: 14th May 2008
Location: United Kingdom
Posted: 19th Nov 2008 23:29
I have converted the DBPro pick object code to GDK.NET using vb.net.

And it works fine when an object is at 0,0,0.

However, as I pick the object and move it away from 0,0,0, when I next try to pick the object, I cannot if I put the mouse pointer on the object, but if I move the pointer away from the object, I can pick the object.

What I am trying to say, is that as the object position is moved away from 0,0,0, the pick object function seems to be affected. See attached image, image on left show pick at 0,0,0, image on right shows affect of pick object after object has been moved from 0,0,0.

Anyone any ideas?

Attachments

Login to view attachments
Yoda Master
16
Years of Service
User Offline
Joined: 23rd Feb 2008
Location: Genova
Posted: 20th Nov 2008 11:22
I use DarkGDK.Net with VB.NET but the PickObject function works perfectly to me! I don't have DBPro installed on the same machine where I use GDK.NET, but I don't think that DBPro can affect GDK functions.

Your coordinates seems to be messed up! Are you positioning the camera on starting coordinates, then calling the pickobject function and repositioning the camera to its final destination maybe? Check that your code doesn't move the camera after the pickobject function is performed.

If it doesn't work post some code.

Fear leads to anger
Anger leads to hate
Hate leads to suffering
Greg Bassett
16
Years of Service
User Offline
Joined: 14th May 2008
Location: United Kingdom
Posted: 20th Nov 2008 22:04
Hi Yoda Master!

Thanks for your reply, code snippet as follows:



Any help greatly appreciated!

Greg
Greg Bassett
16
Years of Service
User Offline
Joined: 14th May 2008
Location: United Kingdom
Posted: 21st Nov 2008 12:40
Found the answer!



I was setting the camera range values back to front? doh!

I was using variables for Front and Back values.

iFront = 1
iBack = 3000
oDBCamera.SetCameraRange(iBack, iFront)

should be

oDBCamera.SetCameraRange(iFront, iBack)

Silly me...




Login to post a reply

Server time is: 2024-11-25 07:56:48
Your offset time is: 2024-11-25 07:56:48