Hey,
I am getting a strange problem with the order that my objects are being drawn (image attached).
I was wondering if anyone had come across this before and has a solution.
I can post more source code if necessary but the main points are:
Player.cpp:
dbPositionObject(playerId, playerPosX, playerPosY, playerPosZ);
dbScaleObject(playerId, playerScale, playerScale, playerScale);
dbTextureObject(playerId, playerTexture);
dbSetObjectEffect(playerId, playerEffect);
dbSetObjectLight(playerId, 1);
dbSetObjectAmbient(playerId, 0);
dbRotateObject(playerId, 0, 180, 0);
dbFixObjectPivot(playerId);
Weapon.cpp:
dbPositionObject(weaponModelId, dbObjectPositionX(player), dbObjectPositionY(player), dbObjectPositionZ(player));
dbScaleObject(weaponModelId, 1500, 1500, 1500);
dbTextureObject(weaponModelId, weaponTextureId);
dbSetObjectEffect(weaponModelId, 1);
dbMakeMeshFromObject(1, player);
dbAddLimb(player, 2, 1);
dbGlueObjectToLimb(weaponModelId, player, 2);
dbOffsetLimb(player, 2, -5, 40, -35);
Thanks!
EDIT:
I ran some tests also, it is not my shader, or my models. I have tried with DGDK objects and no shaders/different shaders and it still produces the same result.