Chrisir wrote on Jan 3rd, 2010, 3:28am:Hello,
I can't help you with that...
It's just that I'am highly interested in your boxLine-function.
I would be very greatful if you could post that.
Not sure if this is what you are expecting

You may need to add some math to orientate the box to the camera - the Z axis is what you want to change for this.
Quote:void drawLine(float x1, float y1, float z1, float x2, float y2, float z2, float weight, color strokeColour)
{
PVector p1 = new PVector(x1, y1, z1);
PVector p2 = new PVector(x2, y2, z2);
PVector v1 = new PVector(x2-x1, y2-y1, z2-z1);
float rho = sqrt(pow(v1.x,2)+pow(v1.y,2)+pow(v1.z,2));
float phi = acos(v1.z/rho);
float the = atan2(v1.y,v1.x);
v1.mult(0.5);
pushMatrix();
translate(x1,y1,z1);
translate(v1.x, v1.y, v1.z);
rotateZ(the);
rotateY(phi);
noStroke();
fill(strokeColour);
box(weight,weight,p1.dist(p2)*1.2);
popMatrix();
}
James