Sorry your browser is not supported!

You are using an outdated browser that does not support modern web technologies, in order to use this site please update to a new browser.

Browsers supported include Chrome, FireFox, Safari, Opera, Internet Explorer 10+ or Microsoft Edge.

DarkBASIC Discussion / Problems with an onboard flight cam. Someting with the Z-axis

Author
Message
MKA
21
Years of Service
User Offline
Joined: 14th Oct 2003
Location:
Posted: 14th Oct 2003 17:13
This was posted earlier by Devil Master:

Look at this code: it uses the Xrotate, Yrotate and Zrotate commands to (theoretically) move the camera in every direction. BUT... I noticed that, whilst the X axis rotates with the camera, the Z axis does not. This means that if the camera is looking 90? to the right or 90? to the left, the X and Z axes will coincide!
Try it. You move up and down with the up and down arrows, left and right with the left and right arrows, and you ROLL left and right by holding the right mouse button and pushing the left and right arrows. Move 90? to the left or to the right, move up and down (note the code of the up/down movements) and then try to roll...
MKA
21
Years of Service
User Offline
Joined: 14th Oct 2003
Location:
Posted: 14th Oct 2003 17:20
Now I'm having the same problem. I've build a camera (like you're sitting in a cockpit) that can rotate around it's x and y axis. So it can go up and down with the upkey and downkey (turn around the x-axis). And it go's left and right with the left and right key(turn around the y-axis). Now the problem is that I want to roll the plane as well. So in the initial position (lets say flighing north) when I turn around the z-axis the plane rolls well. But when I'm flighing west or east the plane will go up and down instead of rolling. Conclusion is that the Z-axis doesn't turn with the camera. Normally it must have a 90 degrees angle with the x-axis. But now the x-axis becomes the z-axis.

Is this a bug? Am I doing someting wrong? Is it maybe better to roll the camera oriented to an object? Pleas help me with this problem. I promised my friends I will create a much better version of the old game Retaliator!
Jess T
Retired Moderator
21
Years of Service
User Offline
Joined: 20th Sep 2003
Location: Over There... Kablam!
Posted: 15th Oct 2003 08:25
Give code examples...

Knowladge Belongs To The People...
guru of boredom
21
Years of Service
User Offline
Joined: 12th Oct 2003
Location: middle of no where
Posted: 4th Nov 2003 03:57
try using the free flight rotate commands like turn object, pitch object, and roll object
they are alot easier to work with!

its not a bug its a ... a ... a extra feature!
P4 2.4 ghz 120 GB 256 mb GeForce4

Login to post a reply

Server time is: 2025-05-21 09:20:38
Your offset time is: 2025-05-21 09:20:38