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

Author
Message
solo
23
Years of Service
User Offline
Joined: 27th Aug 2002
Location: Israel
Posted: 24th Mar 2003 08:53
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 facing the camera when i run the
program...

solo
23
Years of Service
User Offline
Joined: 27th Aug 2002
Location: Israel
Posted: 24th Mar 2003 08:55
'sync on' is missing, but still doesn't work.

Superbeest
23
Years of Service
User Offline
Joined: 9th Mar 2003
Location: Netherlands
Posted: 24th Mar 2003 09:29
What is the purpouse of your locking idea. If you want a interface you can use sprites in DPPro. That are allready locked plain objects.

By steel will thy flesh divide
solo
23
Years of Service
User Offline
Joined: 27th Aug 2002
Location: Israel
Posted: 24th Mar 2003 10:21
I would like to create a HUD for 3D environment, so i'd prefer
not using sprites.
That code is just a primary test, and i'd like to know
what is the reason for this behaviour.

[solo]

TheCyborg
23
Years of Service
User Offline
Joined: 6th Oct 2002
Location: Denmark
Posted: 24th Mar 2003 10:28
Try putting the color object command after lock object. Don't know if it works.

TheCyborg Development.
http://TheCyborg.Amok.dk
The Ultimate Source To DarkBASIC Programming.
TheCyborg
23
Years of Service
User Offline
Joined: 6th Oct 2002
Location: Denmark
Posted: 24th Mar 2003 10:30
Sorry... I meant: Put the color object command BEFORE the lock object command.

TheCyborg Development.
http://TheCyborg.Amok.dk
The Ultimate Source To DarkBASIC Programming.
solo
23
Years of Service
User Offline
Joined: 27th Aug 2002
Location: Israel
Posted: 24th Mar 2003 13:22
nope.

Please help.

Superbeest
23
Years of Service
User Offline
Joined: 9th Mar 2003
Location: Netherlands
Posted: 24th Mar 2003 13:25
Try to lock first and then position the object. Perhaps that helps?

By steel will thy flesh divide
Superbeest
23
Years of Service
User Offline
Joined: 9th Mar 2003
Location: Netherlands
Posted: 24th Mar 2003 13:27
And often the problem is the Z depth. Try asking in the DBc forum. They will know how to lock those objects. I did that too when I onkly had classic, but I don't remeber how to do it anymore Stupid me. It was something with the screen height and width or something like that.

By steel will thy flesh divide
KuRi
23
Years of Service
User Offline
Joined: 8th Feb 2003
Location:
Posted: 24th Mar 2003 14:30
I thought that to lock an object you should put the Z coordinate at a positive value.

So:
position object 200,31,151.5,-148.5 ???

Try:
position object 200,0,0,100

solo
23
Years of Service
User Offline
Joined: 27th Aug 2002
Location: Israel
Posted: 24th Mar 2003 14:44
Superbeest,
not working. Tnx, i'll try the other forum.

Kuri,
I positioned the camera at z=-150, and pointed it to a positive value
so locking on -148.5 should work.
beside, when there is no locking, the object is visible...

KuRi
23
Years of Service
User Offline
Joined: 8th Feb 2003
Location:
Posted: 24th Mar 2003 15:22
Ah!, By the way, in patch 3.1 lock object only works for camera 0!!!!!!!!!!!

KuRi
23
Years of Service
User Offline
Joined: 8th Feb 2003
Location:
Posted: 24th Mar 2003 15:24
Here is a working code:


solo
23
Years of Service
User Offline
Joined: 27th Aug 2002
Location: Israel
Posted: 24th Mar 2003 17:09
Tnx, but i still don't understand the behaviour.
look at the code. When i remark the LOCK OBJECT, then the object
is far away (at the screen's bottom) and when i use LOCK then it hides
the whole screen. why? the position hasn't been changed...

It seems to me that with LOCK OBJECT the positioning is relative to the camera
(object z position is 0.5, while camera z position is -250).



[solo]

Login to post a reply

Server time is: 2026-07-10 17:18:33
Your offset time is: 2026-07-10 17:18:33