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 Discussion / object in screen problems

Author
Message
toipot2
21
Years of Service
User Offline
Joined: 14th Nov 2003
Location:
Posted: 20th Nov 2003 15:15
Having a few prolems with the object in screen commands, that return the x and y position on the screen of any object.
Apparently this function automatically performs a wrapvalue on any object that exceeds the screen resolution, right?

This has the problem though, that the command will also return the same screen position when the camera is rotated 180 degrees, I'm trying to sort out a selection box system but two selection boxes are being shown, one in the correct position and one in the wrapvalue position, and using
if object in screen(t)=1 then sprite 1, (etc)
produces wierd results, the sprite (selection box) flickers or performs some even wierder things

Any idea of how I could remedy this?

Thanks
Nathan
Phaelax
DBPro Master
22
Years of Service
User Offline
Joined: 16th Apr 2003
Location: Metropia
Posted: 20th Nov 2003 22:42
I've never heard of this. Have some code to post?
ZomBfied
22
Years of Service
User Offline
Joined: 2nd Oct 2002
Location:
Posted: 20th Nov 2003 23:49
It's true. Here I'll make some code up real fast:



You'll notice the text at what should be the x and y coords of the object also appear if you turn around 180 degrees. It makes it less useful than it would be if it didn't wrap like that.

What's even worse is that if you say



The words still appear for a moment even though the object is long gone from the screen. This makes it tough for me to do a perfect lense flare function.

Login to post a reply

Server time is: 2025-05-21 16:27:09
Your offset time is: 2025-05-21 16:27:09