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 / Help with my game

Author
Message
Mr X
18
Years of Service
User Offline
Joined: 25th Sep 2005
Location: Universe, milkyway, sol-system, Earth...
Posted: 12th Jan 2006 17:13 Edited at: 12th Jan 2006 18:58
Ive tryed to create a labelsystem for my 3d space game. And it works... but not as I want it to. You see, the idea was to make so a label that shows the name of a planet will apear on the planets location as soon as it enter the screen. That part works. BUT IF YOU ROTATE 180 DEGREES YOULL SEE THE LABEL IN SPACE!!! First i did it like this:
. Then I tryed to make so the label would disapear when it did get out of the screen. But that didnt work. Can anyone help me?

EDIT:

Im sorry for not posting the other peace of code I tryed when the first one didnt work, but I cant post it, its too wide.
Mr X
18
Years of Service
User Offline
Joined: 25th Sep 2005
Location: Universe, milkyway, sol-system, Earth...
Posted: 12th Jan 2006 18:45 Edited at: 12th Jan 2006 18:53
This is the working part: the text over the planet.

(The box is the ship, I havent got any models).

EDIT

I appologise that you have to download the image, I dont know how to add images properly.

Attachments

Login to view attachments
Mr X
18
Years of Service
User Offline
Joined: 25th Sep 2005
Location: Universe, milkyway, sol-system, Earth...
Posted: 12th Jan 2006 18:49
This is the part that doesent work, the text aint supposed to even exist if I made the code right. How do I fix it?

Attachments

Login to view attachments
Mr X
18
Years of Service
User Offline
Joined: 25th Sep 2005
Location: Universe, milkyway, sol-system, Earth...
Posted: 12th Jan 2006 19:58
I think I know whats wrong. I say to the program to print the name of the planet at its 2d coordinates on the screen. And it does that, even if I turn the camera away, so the planet aint visual on the screen. So, how do I check if its visual on the screen?
smallg
Valued Member
18
Years of Service
User Offline
Joined: 8th Dec 2005
Location: steam
Posted: 12th Jan 2006 20:16
have you tried;
This command will return a value of one if the specified 3D object is wholey or partly visible within the screen borders, otherwise zero is returned. Even if the object is behind the camera, it's overall size may partially clip the screen area. The parameter should be specified using an integer value.

SYNTAX
Return Value=OBJECT IN SCREEN(Object Number)
??

life's one big game
Mr X
18
Years of Service
User Offline
Joined: 25th Sep 2005
Location: Universe, milkyway, sol-system, Earth...
Posted: 12th Jan 2006 22:04
Thanks, it works now.

Login to post a reply

Server time is: 2024-09-24 13:30:05
Your offset time is: 2024-09-24 13:30:05