Hello All:
I'm quite sure I'm doing something incorrectly, but can anyone verify that this works in the GDK. I am trying to make a Orthogonal view of some cubes.
I found this link:
http://forum.thegamecreators.com/?m=forum_view&t=17832&b=7
But when I reposition the camera, I cannot see any of my objects.
Here is some code to chew on:
#include "DarkGDK.h"
int CheckObject()
{
int mouseX = dbMouseX();
int mouseY = dbMouseY();
return dbPickObject(dbMouseX(), dbMouseY(), 1, 64);
}
void DarkGDK ( void )
{
dbSyncOn ( );
dbSyncRate ( 60 );
int cubeCounter = 1;
int y = 0;
int x = 0;
for(y = 0; y < 8; y++)
{
for(x = 0; x < 8; x++)
{
dbMakeObjectCube(cubeCounter,5);
dbPositionObject(cubeCounter, x*6,y*6,40);
dbTextureObject(cubeCounter,1);
cubeCounter++;
}
}
dbDrawSpritesLast();
// Set the camera position
//Uncommenting the next line is I think how I need it.
//dbSetCameraFOV(361.45);
dbPositionCamera (30,30,-80);
while ( LoopGDK ( ) )
{
do
{
dbText(1,1,dbStr(CheckObject()));
dbYRotateObject (CheckObject(),dbObjectAngleY(CheckObject())+5);
} while (!dbEscapeKey);
dbSync ( );
}
}
Thanks for any help!
[EDIT]
Fixed: I added these lines in:
dbPositionCamera (20,20,-2000);
dbPointCamera (20,20,0);
The trick is, keep the X and Y the same values for both dbPositionCamera and dbPointCamera. Use the Z for depth BUT Point at position zero.
That seem to help a lot. Thanks anyways!
Your mod has been erased by a signature