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 / What does this statement mean?

Author
Message
Outerblob
14
Years of Service
User Offline
Joined: 27th Jul 2009
Location:
Posted: 28th Jul 2009 19:20
Lock object on 1

I was looking through a tutorial and I saw that. Can somebody explain it to me?

Why change the the world when it changes itself?
TheComet
16
Years of Service
User Offline
Joined: 18th Oct 2007
Location: I`m under ur bridge eating ur goatz.
Posted: 28th Jul 2009 19:41
This will lock an object to the screen. So no matter what angle or position your camera is at, that object will stay at the same position stuck to the camera, as if you got a picture of the object and stuck it to the screen. The object also won't go behind any other objects, it is drawn above any other objects.

TheComet


Make the path of your enemies easier with Waypoint Pro!
Outerblob
14
Years of Service
User Offline
Joined: 27th Jul 2009
Location:
Posted: 28th Jul 2009 19:52 Edited at: 28th Jul 2009 19:56
Oh ok...

Since that has been clarified,



Why change the the world when it changes itself?
TDK
Retired Moderator
21
Years of Service
User Offline
Joined: 19th Nov 2002
Location: UK
Posted: 28th Jul 2009 19:58
Outerblob:

Just edited your post and can see why your code tagging is not working. I've fixed it for you here.

It looks like you are trying to manually add the tags but you aren't using the tags properly.

Use the method I outlined in your other thread - it's much easier!

TDK

BN2 Productions
20
Years of Service
User Offline
Joined: 22nd Jan 2004
Location:
Posted: 28th Jul 2009 22:06
Note that with LOCK OBJECT, the object uses a new coordinate system for positioning, that is, one centered at the camera and at the camera's orientation.

Great Quote:
"Time...LINE??? Time isn't made out of lines...it is made out of circles. That is why clocks are round!" -Caboose
Caleb1994
15
Years of Service
User Offline
Joined: 10th Oct 2008
Location: The Internet you idiot!
Posted: 29th Jul 2009 19:29
ya so essentially it makes it so for that object 0,0,0 is on the camera.

New Site! Check it out \/
Bluestar4
18
Years of Service
User Offline
Joined: 19th Dec 2005
Location: USA
Posted: 30th Jul 2009 15:58 Edited at: 30th Jul 2009 16:48
just a little note on this. you will have add a little to the object's z position before you can see it. Lets say you create a plain and lock it to the camera. Its default position will be 0,0,0 . but, dark basic wont render items that close so it will bascially be invisible. To correct this , you must re-position the object so that its a little farther away using "position object"
Please look up this command in your included manual so you can follow along as I explain this. You will find that this command has 4 parameters. the first ofcourse is the object number you wish to reposition, the next three are the new x,y, and z postiions of the object. changing the x position value will move it left and right on the screen. changing th y position value will move it up or down on the screen. and finally , changing the z position to a positive number will move it far away enough for you to see it.

bluestar4~
---Missle Might - Hero Battles - Zillipede --- which do you like the best ?

Login to post a reply

Server time is: 2024-05-20 07:45:32
Your offset time is: 2024-05-20 07:45:32