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 / Lock Object problem

Author
Message
solo
22
Years of Service
User Offline
Joined: 27th Aug 2002
Location: Israel
Posted: 24th Mar 2003 14:47
If LOCK OBJECT suppose to keep the relative distance,position
from the camera, so how come the following plain dissapears when i
add the comand LOCK OBJECT?
Without that command the object is visible on screen when i run the
program...



[solo]
solo
22
Years of Service
User Offline
Joined: 27th Aug 2002
Location: Israel
Posted: 25th Mar 2003 00:52
Another thing, isn't the plain supposed to be colored?
when i don't use COLOR OBJECT, the plain is black (maybe darked?)
and not colored white as it supposed to be as default.

Dr DooMer
22
Years of Service
User Offline
Joined: 22nd Dec 2002
Location: United Kingdom
Posted: 25th Mar 2003 01:44
The answer's in the question...

The lock object command keeps all the position and angle data relative to the camera. From I can see on your coding, your object will appear out of the camera's view.

Try a command like position object 200, 0, 0, 10. This will position the object exactly ten units away from the camera, right in the centre of the screen. From there, just fiddle with the three position vectors until you get the object into the right place.

"I am a living, thinking entity who was created in the sea of information."
solo
22
Years of Service
User Offline
Joined: 27th Aug 2002
Location: Israel
Posted: 25th Mar 2003 01:52
Thats how it seems, but shouldn't POSITION OBJECT declares the absolute position in the 3D world, and not
a relative position to the camera?

When i use COLOR OBJECT or TEXTURE OBJECT, the plain remains black,
but when i use, at the same position, a BOX, then the texture/color
is visible. what have i missed?

[solo]

indi
22
Years of Service
User Offline
Joined: 26th Aug 2002
Location: Earth, Brisbane, Australia
Posted: 25th Mar 2003 02:47


Dr DooMer
22
Years of Service
User Offline
Joined: 22nd Dec 2002
Location: United Kingdom
Posted: 25th Mar 2003 04:26
Position object sets an object's position based on what it is aligned to. Most of your objects will be aligned to the world coodinates, with 0,0,0 being the centre of your world.

However, when you lock an object to the camera, it is no longer assigned to the world coodinates; instead, it becomes assigned to the camera coodinates, with the camera's position becoming the new 0,0,0.

It's pretty hard to explain, but just imagine that locked objects exist within a little world of their own that follows the camera around.

As for your colour/texture problem, I've haven't really got much of an idea. all that I can suggest is that your plain is facing the wrong direction and you're actually seeing the backface of it. Try flipping it over or removing its sensitivity to light and see if that helps.

"I am a living, thinking entity who was created in the sea of information."
solo
22
Years of Service
User Offline
Joined: 27th Aug 2002
Location: Israel
Posted: 25th Mar 2003 07:45
Dr DooMer:
Thanx, now the POSITION and LOCK OBJECT are
perfectly clear.


indi:
Thanx too, your code leaves no questions.

[solo]

indi
22
Years of Service
User Offline
Joined: 26th Aug 2002
Location: Earth, Brisbane, Australia
Posted: 25th Mar 2003 09:26
John H
Retired Moderator
22
Years of Service
User Offline
Joined: 14th Oct 2002
Location: Burlington, VT
Posted: 25th Mar 2003 14:09
Or you could try positioning the object at the cameras coords, except for Z it would be like +10

RPGamer

Current - RPG: Eternal Destiny
http://www.halbrosproductions.netfirms.com
Dont ask those questions! Read the help files lazy! Oh ya, and Tat has a plugin for that!

Login to post a reply

Server time is: 2025-05-17 16:23:20
Your offset time is: 2025-05-17 16:23:20