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 / why won't lock obects stay square?

Author
Message
HowDo
23
Years of Service
User Offline
Joined: 28th Nov 2002
Location: United Kingdom
Posted: 10th Oct 2011 14:12
Hi All

writing a bit of code, for some reason a small .1,.1 plain will not stay that size when used as a locked object.

here's the code for spotting if I've done something wrong, or have I found a bug in lock objects?

the plain will be used as a top down screen of playing area.



Dark Physics makes any hot drink go cold.
Chris Tate
DBPro Master
17
Years of Service
User Offline
Joined: 29th Aug 2008
Location: London, England
Posted: 10th Oct 2011 14:25
Hi HowDo

The plane has been clipped off by the camera.

Add the following line somewhere and it will fix the problem


Note that you might get some clipping problems when polygons overlap, adjust the setting accordingly.

HowDo
23
Years of Service
User Offline
Joined: 28th Nov 2002
Location: United Kingdom
Posted: 10th Oct 2011 15:02
Chris Tate thanks that worked great.


Ok, now how do I stop the set camera to image putting the lock object on the image. its put on the main screen but also shown on the textured image which I don't want.

would do a search but not sure what to search for to find answer.

Dark Physics makes any hot drink go cold.
Chris Tate
DBPro Master
17
Years of Service
User Offline
Joined: 29th Aug 2008
Location: London, England
Posted: 10th Oct 2011 17:32
http://forum.thegamecreators.com/?m=forum_view&t=120210&b=1

I see you posted this issue a 4 years ago. The Set Object Mask method will be your friend; where N is the camera ID, use

Set Object Mask ObjectId, 2^N

I have set up an article which goes into more detail about the use of this function; it features an example.

http://www.binarymodular.com/main/articles.php?article_id=95


Check out the data operations page if uncertain about the bits parameter.

revenant chaos
DBPro Master
19
Years of Service
User Offline
Joined: 21st Mar 2007
Location: Robbinsdale, MN
Posted: 10th Oct 2011 17:35 Edited at: 10th Oct 2011 17:36
I haven't tried it with locked objects, but I would imagine "set object mask objid" is what you are looking for. You could also try hiding the plain when you are syncing camera 0.

Edit: too late...

Login to post a reply

Server time is: 2026-07-11 04:43:40
Your offset time is: 2026-07-11 04:43:40