I cannot get my object to load, Its a VERY simple map, I tried SetObjectCull or something like that, and a bunch of other stuff (thats why its scaled 10000), if anybody knows whats going on please help me! The filepath is correct as with the name, and i exported it from blender as .x and I even tried .3ds with no luck
#include "DarkGDK.h"
#include "DarkPhysics.h"
#include "DarkAI.h"
#include "DarkLights.h"
#include "ShaderData.h"
#pragma comment ( lib, "DarkPhysics.lib" )
#pragma comment ( lib, "DarkAI.lib" )
#pragma comment ( lib, "DarkLights.lib" )
#pragma comment ( lib, "ShaderData.lib" )
void DarkGDK ( void ) {
//Settings
dbSyncOn();
dbPhyStart();
dbPhySetGravity(0,-200,0);
dbSyncRate(60);
dbBackdropOn();
dbPositionCamera(0,0,-10,30);
//Player
dbMakeObjectSphere(1,40);
dbPositionObject(1,0,0,0);
//Other Objects
dbLoadObject("C:\Users\Brett\Desktop\Coding Modelling\Models\Testmap.x",2);
dbScaleObject(2,10000,10000,10000);
//Setting up physics
dbPhyMakeRigidBodyDynamicSphere(1);
dbPhyMakeRigidBodyStaticMesh(2);
//Camera
dbRotateCamera(0,0,0,0);
//Loop
while( LoopGDK ( ) ) {
//Declare player position as x,y,z
float x = dbObjectPositionX(1);
float y = dbObjectPositionY(1);
float z = dbObjectPositionZ(1);
//Raycast
dbPhyRayCastAllShapes(x,y,z,0,-1,0);
float coly = dbPhyGetRayCastDistance();
//Movement
//Upkey
if (dbKeyState(200) == 1) {
dbPhyAddRigidBodyForce(1,0,0,3,2);
}
//Downkey
if (dbKeyState(208) == 1) {
dbPhyAddRigidBodyForce(1,0,0,-3,2);
}
//Rightkey
if (dbKeyState(205) == 1) {
dbPhyAddRigidBodyForce(1,3,0,0,2);
}
//Leftkey
if (dbKeyState(203) == 1) {
dbPhyAddRigidBodyForce(1,-3,0,3,2);
}
//Jumping
//Spacebar
if (dbKeyState(57)) {
if ((coly > 10) && (coly < 25))
{
dbPhyAddRigidBodyForce(1,0,50,0,2);
}
}
//Position camera to player
dbPositionCamera(0,x,y,z-100);
//Display x,y,z
dbInk(RGB(250,0,160),RGB(250,0,160));
dbText(0,0,dbStr((int)x));
dbText(0,10,dbStr((int)y));
dbText(0,20,dbStr((int)z));
dbText(0,30,dbStr((int)coly));
//Update Screen and Physics
dbShowObject(2);
dbPhyUpdate();
dbSync();
}
}
I want coke, not Pepsi!