I have my 3D camera at 0.0,30.0,0.0 -> 0.0,-100.0,0.0 and for some reason nothing is displayed. Change the Z value to anything and all the objects are displayed for some reason
Perhaps whit this values you are into the 3D objetcs... and if the normals not are displayed in both sides perhaps it´s this...
The diferender of the y in the camera and the Target not it´s too much
0.0,30.0,0.0 -> 0.0,-100.0,0.0
Another thing... I don´t rebember if it´s the same case than you, but try something like this...
0.1,30.0,0.0 -> 0.0,-100.0,0.0
Only change a little the parameter them are equal... I rebember I have trobles whit this... some similar to my post about (Rgb(x,x,x))
Strange. So you're looking straight down, in the center of the world (x,z)?
Is this related to some kind of 'gimbal lock' style bug?
Maybe the 'camera up' vector is screwed up?
For an experiment, you could try adding this before 'X_CAMERA':
X_CAMERAUP 1,0,0
Ha, I really have no idea what this will do, just throwing out some debugging ideas.
But, you'd still thing GLBasic should handle this situation.
Maybe Gernot could detect this situation, and slip in a '0.0000001' for one of the x or z values.
Quote from: mentalthink on 2012-Feb-23
Perhaps whit this values you are into the 3D objetcs... and if the normals not are displayed in both sides perhaps it´s this...
The diferender of the y in the camera and the Target not it´s too much
0.0,30.0,0.0 -> 0.0,-100.0,0.0
Another thing... I don´t rebember if it´s the same case than you, but try something like this...
0.1,30.0,0.0 -> 0.0,-100.0,0.0
Only change a little the parameter them are equal... I rebember I have trobles whit this... some similar to my post about (Rgb(x,x,x))
The trouble with using a non X or Z value is that, whilst everything does look fairly straight, you can see it is at an angle...
QuoteStrange. So you're looking straight down, in the center of the world (x,z)?
Is this related to some kind of 'gimbal lock' style bug?
I was wondering that too
At the moment, I'm doing it along the Z value instead - had to rotate my graphics, but aside from that it works okay.
also play with camerarange
Can not confirm your problem, you camera coordinates work for me. maybe you need to take care, that your objects get in range?
Oh yes, it's all in range and will display when the Z value is set to something like 0.1
Another problem - is X_SCREENTOWORLD working properly - it seems to be returning values that have no real relation to actual 3D coordinates :
Quote-1.384185482e-002
-1.384185482e-002
-1.012185649e-002
When the actual coordinate should be around -15 and -11
Oh i just realized that i tested with X_CAMERAUP, in this case it is working (just set it to 0,0,1 or 1,0,0). Without changing the camera up vector it doesnt show any object. Changing the up vector is better than adding an offset.
Yes, I'll probably have to use that.
SCREEN2WORLD is being a bit odd.
If sz<0 then I get a decent range of positions, but the step value between then is well over double the width of the object for some reason...
If sz>0 then I get the very small x and y positions...
I've always had to move the camera target by a fraction to get a top view.
X_CAMERA 0.0, 30.0, 0.0 ,0.001, -100.0, 0.0
I just came across this problem.