Ok before I get anywhere:
It is .x
I checked the file in notepad
I checked it in directX viewer and it's fien
I used dbObjectExist and it came out with a 0
The filepath is correct
I tried using dbShowObject(2);
It is not showing anywhere, I was using default dbMakeObject commands before and they worked fine, but this won't, any idea what's going on? (Never mind the jumping I am working on it)
Yes I have DGS bonanza but I don't think that matters for this
#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,-100,0);
dbSyncRate(60);
dbBackdropOn();
dbPositionCamera(0,0,-10,30);
//Player
dbMakeObjectSphere(1,20);
dbPositionObject(1,0,50,0);
dbColorObject(1, RGB(0,255,0));
//Other Objects
dbLoadObject("C:\Users\Brett\Desktop\Models\map1.x",2);
dbPositionObject(2,0,0,0);
dbScaleObject(2,5000,5000,5000);
//Setting up physics
dbPhyMakeRigidBodyDynamicSphere(1);
dbPhyMakeRigidBodyStaticMesh(2);
//Camera
dbRotateCamera(0,90,0,0);
//Loop
while( LoopGDK ( ) ) {
//Declare player position as x,y,z
float x = dbObjectPositionX(1);
float y = dbObjectPositionY(1);
float z = dbObjectPositionZ(1);
float objectexist = dbObjectExist(2);
//Collision
float coly = dbPhyGetCollision(1,1);
//Movement
if (dbKeyState(200) == 1) {
dbPhyAddRigidBodyForce(1,0,0,5,2);
}
if (dbKeyState(208) == 1) {
dbPhyAddRigidBodyForce(1,0,0,-5,2);
}
if (dbKeyState(205) == 1) {
dbPhyAddRigidBodyForce(1,5,0,0,2);
}
if (dbKeyState(203) == 1) {
dbPhyAddRigidBodyForce(1,-5,0,0,2);
}
//Jumping (attempt)
if (dbKeyState(57) == 1) {
if (coly == 0) {
dbPhyAddRigidBodyForce(1,0,10,0,2);
}
}
//Position camera to player
dbPositionCamera(0,x,y+100,z);
//Display x,y,z
dbInk(RGB(0,255,0),RGB(0,255,0));
dbText(0,0,dbStr((int)x));
dbText(0,10,dbStr((int)y));
dbText(0,20,dbStr((int)z));
dbText(0,30,dbStr((int)coly));
dbText(0,40,dbStr((int)objectexist));
//Update Screen and Physics
dbPhyUpdate();
dbSync();
}
I want coke, not Pepsi!