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 Professional Discussion / position object in front of the camera ?

Author
Message
simonuk74
23
Years of Service
User Offline
Joined: 3rd Nov 2002
Location:
Posted: 21st Sep 2003 20:59
how would I place an objec, say a cube, at a set distance, infront of the camera, and get it to match the co-ordinates of the mouse on the screen ?

to help, what I have, is a series of boxes, which is the game area, which the camera looks at, and I rotate the camera around the boxes.
but I need to be able to place an object behind the boxes ( the game area is at 300 from the cam, and the object is to be placed at 500 from the cam )

I`ve seen all the posts on how to get an object to be placed on a matrix, and various angles, but what I need is to always have the plain that the object is on is parallel to the monitor screen.

I`ve added a lil pic to try to explain for me..

[img]C:\Documents and Settings\Simon\My Documents\My Pictures\game.jpg[/img]
simonuk74
23
Years of Service
User Offline
Joined: 3rd Nov 2002
Location:
Posted: 21st Sep 2003 21:00
ok, so the pic didnt work, - I have no web page so I cant get it here
haggisman
23
Years of Service
User Offline
Joined: 26th Aug 2002
Location: United Kingdom
Posted: 21st Sep 2003 23:00
I think the pick commands are what you are looking for, heres a little example code:-



Defying the convention of an upright avatar since 1985
simonuk74
23
Years of Service
User Offline
Joined: 3rd Nov 2002
Location:
Posted: 22nd Sep 2003 09:51
Hmm I get lots of commands there that are not recognised, pick screen , get pick vector ?

but I have just reinstalled DBP, so I have not upgraded!

whats the safest patch to put on ? is 5 ok ?
Phaelax
DBPro Master
23
Years of Service
User Offline
Joined: 16th Apr 2003
Location: Metropia
Posted: 22nd Sep 2003 11:14
5 works fine for me. Check out this site, there's code to do exactly what you want. http://www.underwaredesign.com/
Just click on PRODUCTS, then SNIPPETS.

Login to post a reply

Server time is: 2026-07-25 07:01:25
Your offset time is: 2026-07-25 07:01:25