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 / How to position a 3d object directly behind a 2d screen cord.

Author
Message
Benjames8
14
Years of Service
User Offline
Joined: 6th Jan 2010
Location: Your Nightmares
Posted: 2nd Feb 2011 05:58 Edited at: 2nd Feb 2011 06:41
To to be specific I don't want dbObjectScreenX() function's I want the pretty much the opposite.

I was thinking of returning the dbObjectScreenX() then comparing it to the screen position I want, then changeing it, checking it, then changing it again over and over until its right but WTF who wants to do that, and I'm sure I would never get the depth down ever.

[edit]Here's this:


The Feild of view is set to thirty btw.. But This code sucks becuse if I want to use it the camera has to face a certain direction.
Please Help me nerdy vertex masters
dark coder
21
Years of Service
User Offline
Joined: 6th Oct 2002
Location: Japan
Posted: 2nd Feb 2011 08:34 Edited at: 2nd Feb 2011 08:35
dbPickScreen is the inverse of dbObjectScreenX/Y, you can then use dbGetPickVectorX/Y/Z functions to get the camera position relative offsets.

Benjames8
14
Years of Service
User Offline
Joined: 6th Jan 2010
Location: Your Nightmares
Posted: 4th Feb 2011 05:58
Quote: "This command will calculate a relative 3D coordinate from a 2D screen coordinate."


When they say relative they meant it lol, Thanks though dark coder. I like your avatar and your kitty in space pic.

Login to post a reply

Server time is: 2024-06-23 02:46:56
Your offset time is: 2024-06-23 02:46:56