So I'm trying to make a bullet that appears when the right/left buttons are clicked but for some reason it pops me outside my map and then creates the bullet, instead of creating it at the camera location.
Right now I've tried to save the camera position and then make the bullet appear there but its still not working.
if (dbMouseClick() == 2) // right
{
float CurrentCameraX = dbCameraPositionX();
float CurrentCameraY = dbCameraPositionY();
float CurrentCameraZ = dbCameraPositionZ();
dbMakeObjectSphere(20,10,180,180);
dbPositionCamera(CurrentCameraX,CurrentCameraY,CurrentCameraZ);
dbSetObjectToCameraOrientation(20);
}