We closed this forum 18 June 2010. It has served us well since 2005 as the ALPHA forum did before it from 2002 to 2005. New discussions are ongoing at the new URL http://forum.processing.org. You'll need to sign up and get a new user account. We're sorry about that inconvenience, but we think it's better in the long run. The content on this forum will remain online.
IndexProgramming Questions & HelpOpenGL and 3D Libraries › 3D Point Rotation Pitch and Yaw
Page Index Toggle Pages: 1
3D Point Rotation Pitch and Yaw (Read 1107 times)
3D Point Rotation Pitch and Yaw
Dec 19th, 2006, 3:05pm
 
Hi,
I want to rotate a point in 3D. I have my ship, a model that's drawn based on a horizontal angle and a vertical angle (pitch and yaw, I'm not too worried about yaw but if it's not hard, that would be nice too) and I want the camera to face the back of the ship, basically flat on. So say the ship is at 45deg vertically nose up and 0deg rotated right, I want the camera to be 50 units behind and rotated 45deg down, 0 left. I've been reading about euler angles, quaternions and rotation matrices but I can't seem to figure it out. Can someone help me? Thanks,
Joseph Duchesne
Re: 3D Point Rotation Pitch and Yaw
Reply #1 - Dec 19th, 2006, 4:37pm
 
My sketch and class SpaceShip may help you.
http://www.geocities.jp/classiclll_newweb/HSBSphereWalkThrough/applet/index.html

[navigation]
to pan your ship, press 6/d/[right] key toward right.
                                   4/a/[left] key toward left.
to swing, press 8/w/[up] key toward up.
                       2/z/[down] key toward down.
to tilt, press 9/e key toward right side down
                  7/q key toward left side down
to accelarate, press 0/[space] key
to brake, press .[dot] key
to enpower, press [shift] key
to weakpower, press [control] key
to stop, press 5/s key
to turn , press -/b key
Page Index Toggle Pages: 1