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.

Dark GDK / Update object so in front of camera

Author
Message
Fable
16
Years of Service
User Offline
Joined: 27th Jan 2008
Location:
Posted: 27th Jan 2008 16:14
I am trying to make a fps but so far i have been stumped on how to,once the gun has been loaded to make it follow the camera in such a way it is always in front of it in the players view. Does anyone know how once you have loaded the object you could do this?
monotonic
18
Years of Service
User Offline
Joined: 24th Mar 2006
Location: Nottinghamshire, England
Posted: 27th Jan 2008 23:24
You can use the dbLockObjectOn( ObjNum ); function.

From the GDK help files:

Quote: "
dbLockObjectOn

This command will lock the specified 3D object to the screen. Locking objects to the screen commands the object to completely ignore the camera's influence. A locked object will be positioned as though the camera had never been altered from its default orientation. To make locked objects visible, simply set the Z position to a significant positive value.

Syntax

void dbLockObjectOn ( int iObject ) "


The Sun is trying to kill me!
Fable
16
Years of Service
User Offline
Joined: 27th Jan 2008
Location:
Posted: 30th Jan 2008 20:40
okay dne dat but how to change jst the x value of the object and nt all 3 such as x y and z, or is dat the only way to do it?
monotonic
18
Years of Service
User Offline
Joined: 24th Mar 2006
Location: Nottinghamshire, England
Posted: 31st Jan 2008 23:24
All you need to do is dbpositionObject( ObjNum, NewXValue, dbObjectPositionY( ObjNum ), dbObjectPositionZ( ObjNum ) );

The Sun is trying to kill me!

Login to post a reply

Server time is: 2024-09-29 11:29:11
Your offset time is: 2024-09-29 11:29:11