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 / Object Moving Problem

Author
Message
Bio Hazard
17
Years of Service
User Offline
Joined: 12th Sep 2007
Location: Ununited states
Posted: 19th May 2009 01:13 Edited at: 19th May 2009 01:45
Hi, i am in the process of making a game right now. I need some guidance as i have run into a problem. Here is my code




Now that my code is there the problem is that whenever i move my gun with the camera attatched the gun moves WAY faster then the camera does. there is also alot of other problems, but this is my main focused problem. (i cant reply fast as i havent posted on the forums. I am using some of ruccus's fps tutorial code in here, i dont know if its because o mixed in his with mine or maybe i just completely screwed up.)

i added the m16 but i dont have java so i couldnt upload the muzzle flash but you can take that part out of the code.( its object 2)

what is left behind is left behind, but what is ahead might make a difference to whats left behind.

Attachments

Login to view attachments
bobbel
15
Years of Service
User Offline
Joined: 5th Jan 2009
Location: In my DBPro case xD
Posted: 19th May 2009 08:51
well, i think its in the part that u locked an object to the screen and that you are still trying to position the camera at its position. what lock object on simply does is print the object on the screen as if it never moved, but it doesn't actually position the gun in front of you. you should make a dummy object and make that move, and just do lock object on with the gun and then leave the gun alone.

(\__/)
(O.o )
(> < ) This is Bunny. Copy Bunny into your signature to help him on his way to world domination!
BMacZero
18
Years of Service
User Offline
Joined: 30th Dec 2005
Location: E:/ NA / USA
Posted: 19th May 2009 18:10
LOCK OBJECT ON tells DBP to keep positioning the object in front of the camera for you. When you try to move the object while it is locked, you are actually changing where it appears in regards to the camera.



Bio Hazard
17
Years of Service
User Offline
Joined: 12th Sep 2007
Location: Ununited states
Posted: 19th May 2009 22:55
Ahhh thank you very much! So i should make something like an invisible cube and attatch the gun to it and move the circle , but lock on to the gun? or do i do what BmacZero said and not move the object position but the camera position. BTW i used the code from the fps tutorial in dbpro but i dont like way its done. (besides i want to learn how to do this!)

Thank you both!

what is left behind is left behind, but what is ahead might make a difference to whats left behind.
Bio Hazard
17
Years of Service
User Offline
Joined: 12th Sep 2007
Location: Ununited states
Posted: 20th May 2009 01:28
By the way im also having trouble getting a timer down for my bullet count. I have an m16 with 30 bullets all i can think of is


thats because i have never used timers before.
i did the math, normally an m16 holds 20 rounds,
(but i want mine to hold 30) it takes 3 seconds to fire 20
so it takes 5 to fire 30. can some one please help me with timers!
thank you.

what is left behind is left behind, but what is ahead might make a difference to whats left behind.

Login to post a reply

Server time is: 2024-11-25 06:26:31
Your offset time is: 2024-11-25 06:26:31