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 / Ratio between screen pixels, camera distance, & plain size help

Author
Message
zenassem
21
Years of Service
User Offline
Joined: 10th Mar 2003
Location: Long Island, NY
Posted: 7th Jun 2007 07:14
I am using a plain as a semi-transparent window in a tool I am working on. I am not sure I understand the relationship of object size with camera position, and 3d Object position,& screen size. Is there a general rule of thumb to make this easier. I'd like to use the same numbers as screen pixel locations, but I can't seem to hone in the distance that the plain should be from the camera to get it right.

The plain should appear to remain in the same place, with text on top of it, regardless of where the actual game/app postions the camera. I want to keep the window the same size regardless of the camera position. I know I need to adjust in correlation with the camera, but I am having a hard time.

Thanks for any help.

zenassem
21
Years of Service
User Offline
Joined: 10th Mar 2003
Location: Long Island, NY
Posted: 7th Jun 2007 08:04
So far, I have got some of it figured out. I am keeping my plains postioned to the camera orientation, and repositioning it's X,Y,Z based on the camera postion. But I can't help feel there is an easier way.

Basically I want to keep the plain independent of any camera movement. Perhaps I am better off using sprites for my transparent windows???

Scraggle
Moderator
21
Years of Service
User Offline
Joined: 10th Jul 2003
Location: Yorkshire
Posted: 7th Jun 2007 11:08 Edited at: 7th Jun 2007 11:09
Firstly, to position the plain, Cloggy wrote a function that would place your plain at the correct position regardless of screen resolution and camera FOV. You can find the thread here

Once you have got the plain where you want it, you don't need to keep repositioning it when you move the camera. Instead just use the command Lock Object On objnum.



zenassem
21
Years of Service
User Offline
Joined: 10th Mar 2003
Location: Long Island, NY
Posted: 7th Jun 2007 11:11
Thx scraggle, That helps a lot!!!!

Login to post a reply

Server time is: 2024-11-25 17:51:01
Your offset time is: 2024-11-25 17:51:01