• FEATURED

View more

View more

View more

### Image of the Day Submit

IOTD | Top Screenshots

### The latest, straight to your Inbox.

Subscribe to GameDev.net Direct to receive the latest updates and exclusive content.

# camera problems

Old topic!

Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.

No replies to this topic

### #1bloemschneif  Members

Posted 14 August 2001 - 09:43 PM

hallo. i got problems to fix my camera-math. i intended to assign the camera direction to the direction-vec of vehicle. n[0] = 0; n[1]=-1; n[2]=0; //origin dir of vehicle double dir[] = new double[3]; OM.transform(n,dir); //translated to current orientation matrix double ax = -dir[1]; //rotation axis double ay = dir[0]; double az = 0; double angle = Math.acos(dir[2]); Matrix3D Q = new Matrix3D(); //calculate a quaternion double w, x,y,z; w = Math.cos(angle/2); x = ax*Math.sin(-angle/2); y = ay*Math.sin(-angle/2); z = 0; Q.quaternion(w, x,y,z); camera.OM.setTransformation(Q); //setup camera matrix can someone help me? thanks.

Old topic!

Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.