if (currentcomp.getParent() != null){
//Applies all transforms up to this components parent
//because the new camera wiped out all previous transforms
Matrix m = currentcomp.getParent().getGlobalMatrix();
PGraphics3D pgraphics3D = (PGraphics3D)graphics;
pgraphics3D.modelview.apply(
m.m00, m.m01, m.m02, m.m03,
m.m10, m.m11, m.m12, m.m13,
m.m20, m.m21, m.m22, m.m23,
m.m30, m.m31, m.m32, m.m33