Disapearing objects!

Reply

Join Date: Sep 2008
Posts: 350
Reputation: tomtetlaw is an unknown quantity at this point 
Solved Threads: 4
tomtetlaw's Avatar
tomtetlaw tomtetlaw is offline Offline
Posting Whiz

Disapearing objects!

 
0
  #1
Jan 10th, 2009
Im on Windows XP pro.
im using DarkGDK engine.
I am making a FPS in a map that a tutorial provides.

T tell it to load my object and position it under the camera and when i run it i look down and i can see it, but if I move at all, the gun disapears!

heres my code:
  1. #include "DarkGDK.h"
  2.  
  3. void DarkGDK ( void )
  4. {
  5. dbSyncOn ( );
  6. dbSyncRate ( 60 );
  7. SetCurrentDirectory ( "resources" );
  8. dbLoadObject ( "universe.dbo", 1 );
  9. dbSetObjectLight ( 1, 0 );
  10.  
  11. dbLoadObject ( "skybox2.x", 2 );
  12. dbSetObjectLight ( 2, 0 );
  13. dbSetObjectTexture ( 2, 3, 2 );
  14. dbScaleObject ( 2, 5000, 5000, 5000 );
  15.  
  16. dbLoadObject ( "mp5.x", 3 ); //this is the object
  17. dbPositionObject ( 3, 434, 447, -517 );
  18.  
  19. dbPositionCamera ( 434, 450, -517 );
  20.  
  21. float fCameraAngleX = 0.0f;
  22. float fCameraAngleY = 0.0f;
  23.  
  24. while ( LoopGDK ( ) )
  25. {
  26. dbHideMouse ( );
  27.  
  28. dbControlCameraUsingArrowKeys ( 0, 5.0f, 0.3f );
  29.  
  30. fCameraAngleX = dbWrapValue ( fCameraAngleX + dbMouseMoveY ( ) * 0.4f );
  31. fCameraAngleY = dbWrapValue ( fCameraAngleY + dbMouseMoveX ( ) * 0.4f );
  32.  
  33. dbXRotateCamera ( fCameraAngleX );
  34. dbYRotateCamera ( fCameraAngleY );
  35.  
  36. dbSync ( );
  37. }
  38.  
  39. return;
  40. }

any help would be appreciated, thanks in advance
Reply With Quote Quick reply to this message  
Join Date: Apr 2008
Posts: 670
Reputation: Freaky_Chris is a jewel in the rough Freaky_Chris is a jewel in the rough Freaky_Chris is a jewel in the rough 
Solved Threads: 113
Freaky_Chris's Avatar
Freaky_Chris Freaky_Chris is offline Offline
Practically a Master Poster

Re: Disapearing objects!

 
0
  #2
Jan 10th, 2009
Just a stab, when you move do you redraw the gun? cause you will need to.

Chris
Knowledge is power -- But experience is everything
Reply With Quote Quick reply to this message  
Join Date: Sep 2008
Posts: 350
Reputation: tomtetlaw is an unknown quantity at this point 
Solved Threads: 4
tomtetlaw's Avatar
tomtetlaw tomtetlaw is offline Offline
Posting Whiz

Re: Disapearing objects!

 
0
  #3
Jan 11th, 2009
the gun is just in one place, doesnt move at all. but dont worry cuz i fixed it
Reply With Quote Quick reply to this message  
Reply

This thread is more than three months old.
Perhaps start a new thread instead?
Message:



Other Threads in the C++ Forum
Thread Tools Search this Thread



About Us | Contact Us | Advertise | DaniWeb | Acceptable Use Policy | RSS Feed

©2003 - 2009 DaniWeb® LLC