Strange text rotation in 3d
in
Programming Questions
•
6 months ago
Working on a "3d" timeline app, and I have everything based on camera position (so zooming and panning works). I'm able to draw lines on the timeline, but text always has a strange rotation:
Each time the text is drawn it's increasingly rotated. I'm not translating/rotating at all along the process, so I'm stumped. I want the text to be readable from above (where my camera is), and I'd like it rotated 90% so it reads right to left. Here's the code:
float eX,eY,eZ,cX,cY,cZ;
void setup() {
size(960,600,P3D);
noFill();
eX= 190.0;
eY= 450.0;
eZ= 400.0;
cX= eX;
cY= 250.0;
cZ= eZ;
}
void draw() {
background(240);
camera(eX,eY,eZ,cX,cY,cZ, 1.0, 0.0, 0.0);
fill(0);
for (int i=0;i<13;i++) {
text(1900+(10*i), -50, 0, 75*i);
}
}
1