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.

Newcomers DBPro Corner / locking object to camera

Author
Message
dark donkey
18
Years of Service
User Offline
Joined: 4th May 2006
Location:
Posted: 9th Nov 2006 22:34
ive been trying fore a while now to make my very small game work,i have the problem that i cant find a comand to lock the object of a gun to the camera. could some one pleas help me do this

also just a quik question what dose the gosub command do i see it used in the examples that come with dbpro

thanks

http://www.darkdonkeygraphics.tk

Antidote
19
Years of Service
User Offline
Joined: 18th Mar 2005
Location: San Francisco, CA
Posted: 10th Nov 2006 04:18
hmmm I don't know, lock object on...

gosub is a very useful command. Look it up in the help file, just press F1 when the cursor is on the command. Basically it calls subroutines denoted by labels. Looks like this



dark donkey
18
Years of Service
User Offline
Joined: 4th May 2006
Location:
Posted: 10th Nov 2006 10:20
o thanks i dident think it did stuff like that

also what i mean by lock the object to camera is like in an fps the gun is allwas on the screen

http://www.darkdonkeygraphics.tk

BatVink
Moderator
21
Years of Service
User Offline
Joined: 4th Apr 2003
Location: Gods own County, UK
Posted: 10th Nov 2006 11:30
LOCK OBJECT ON MyObj

Position your item, then use the command above. It will always stay in position, relative to the camera.



dark donkey
18
Years of Service
User Offline
Joined: 4th May 2006
Location:
Posted: 10th Nov 2006 11:39
then why whant this code work


http://www.darkdonkeygraphics.tk

dark donkey
18
Years of Service
User Offline
Joined: 4th May 2006
Location:
Posted: 10th Nov 2006 11:41
wait got it work,missed out a do and a loop

http://www.darkdonkeygraphics.tk

dark donkey
18
Years of Service
User Offline
Joined: 4th May 2006
Location:
Posted: 10th Nov 2006 13:53
ive just been construting a small 3d game level, could you pleas tell me why i cant see my x file



http://www.darkdonkeygraphics.tk

BatVink
Moderator
21
Years of Service
User Offline
Joined: 4th Apr 2003
Location: Gods own County, UK
Posted: 10th Nov 2006 15:58
Assuming that you replace "x file" with a valid file name, you are positioning the object in exactly the same place as the camera.



dark donkey
18
Years of Service
User Offline
Joined: 4th May 2006
Location:
Posted: 10th Nov 2006 19:18
it worked with other object like guns and wepons, any way ill try move the object z then

http://www.darkdonkeygraphics.tk

Login to post a reply

Server time is: 2024-09-25 11:23:32
Your offset time is: 2024-09-25 11:23:32