hi all,
sorry , but i just got stuck with a free 360 camera movement.
right now i can move left / right at full 360 … but the up and down holds at -90 / + 90 degree.
here is what i do right now:
this.Control.yrotrad = (this.Control.yrot / 180.0 * 3.141592654 );
this.Control.xrotrad = (this.Control.xrot / 180.0 * 3.141592654 );
// up vector
this.up[0] = 0.0;
this.up[1] = 1.0;
this.up[2] = 0.0;
// eye
this.eye[0] = this.Control.xpos;
this.eye[1] = this.Control.ypos;
this.eye[2] = this.Control.zpos ;
// center point
this.center[0] = this.Control.xpos+(Math.sin(this.Control.yrotrad)*1.0);
this.center[1] = (this.Control.ypos-(Math.sin(this.Control.xrotrad)*1.0));
this.center[2] = this.Control.zpos-(Math.cos(this.Control.yrotrad)*1.0) ;
this.myWGL.CameraView = M4x4.makeLookAt ( this.eye, this.center, this.up );
i guess its all about the up vector … but i just can´t figure out what to do …
can someone complete the code ? or am i going the wrong way ?
thanx
uwi