Jump to content

  • Log In with Google      Sign In   
  • Create Account

We're offering banner ads on our site from just $5!

1. Details HERE. 2. GDNet+ Subscriptions HERE. 3. Ad upload HERE.


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.

  • You cannot reply to this topic
No replies to this topic

#1 bloemschneif   Members   -  Reputation: 122

Like
Likes
Like

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.

Sponsor:



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.



PARTNERS