hey again,
are multiple cameras working correctly in darksdk 1.0? either they are broken or i am doing something wrong. I wanted to make a second camera (camera 1) and set it to output to an image. the problem is that when I make a new camera it completly overwrites camera 0 on the screen. I cannot see any "hide camera" or simular commands to prevent this. I have tried dbSetCurrentCamera(0) but that has no effect.
The only thing I found is changing the camera viewport. But if i set it to all 0's then sure enough i will be able to see camera 0 again, but of course the image that i have set the camera to will now be empty and usless.
check out this example code i have been testing with:
#include "DarkSDK.h"
void DarkSDK(void) {
dbSyncOn();
dbSyncRate(100);
dbMakeCamera(1);
dbSetCameraToImage(1, 1, 100, 100);
dbMakeObjectCube(1, 40);
dbMoveCamera(0, -10);
dbPositionCamera(1, dbCameraPositionX(0), dbCameraPositionY(0), dbCameraPositionZ(0));
dbSetCurrentCamera(0);
dbSetCameraView(1, 0, 0, 10, 10);
dbPointCamera(1, dbObjectPositionX(1), dbObjectPositionY(1), dbObjectPositionZ(1));
while (LoopSDK()) {
if (dbEscapeKey())
return;
dbPasteImage(1, 0, 0);
dbYRotateObject(1, dbWrapValue(dbObjectAngleY(1) - 4));
dbSync ( );
}
}
there should be a cube spinning on screen and in the top left a 10x10 copy of the spinning cube. comment out the set camera viewport and you will loose camera 0's view port.
What is also interesting is try setting the left and top parameters of the camera viewport to 70 or something (the first two 0's) - for me the entire screen gos green with a view blue lines through it if i do that, charming!
Now, am i just thinking about everything wrong and doing it all stupidly? Or is this a bug? if its a bug was it fixed in 1.1? if so i may be forced to upgrade.. but i REALLY want my collision commands too -_-
[07:16:59-pm] « Sephnroth » you were dreaming about lee...
[07:17:13-pm] « Mouse » stfu
[07:17:22-pm] « Mouse » he was hanging himself lol