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 / Rotation problem in the flight sim.

Author
Message
Mr_Insane
22
Years of Service
User Offline
Joined: 14th Nov 2002
Location: United States
Posted: 23rd Jan 2003 02:02
In this one flight sim, I use:

theta#=curveangle(theta#+mousemovex(),theta#,7)
phi#=curveangle(phi#+mousemovey(),phi#,7)

and x,y rotate to control the camera.. I tried loading a ship model in to the game and try to make it act like the camera movements.. unfortunitly, when I move my camera, up and down, the ship rotates on its Z-axis.

Whats the problem here?
Mr_Insane
22
Years of Service
User Offline
Joined: 14th Nov 2002
Location: United States
Posted: 23rd Jan 2003 06:42
anyone???
The Darthster
22
Years of Service
User Offline
Joined: 25th Sep 2002
Location: United Kingdom
Posted: 23rd Jan 2003 19:33
If it's rotating on it's z axis, it probably means the x rotation is absolute rather than relative to the object. I.e. if you turn the object 90 degrees in the y rotation, then xrotate it it will rotate relative to the world's x axis, not relative to the object as you may expect. The turn object, pitch object and roll object commands sort this problem out, but they may be in the enhancement pack.
Mr_Insane
22
Years of Service
User Offline
Joined: 14th Nov 2002
Location: United States
Posted: 27th Jan 2003 05:30
ok the ship isn't actually rotating on the Z axis but when I pitch the camera up, the ship pitches down. I even use SET OBJECT TO CAMERA command and get this problem.
Mr_Insane
22
Years of Service
User Offline
Joined: 14th Nov 2002
Location: United States
Posted: 28th Jan 2003 05:39
heres a code for making the object getting the angle for the camera tis a different engine:



unfortunitly, it doesn't seem work.. when I get to a certain angle, I see the back of the ship. Like this:
http://www.boomspeed.com/n6th/problem2.jpg
Mr_Insane
22
Years of Service
User Offline
Joined: 14th Nov 2002
Location: United States
Posted: 29th Jan 2003 05:25
bump
Mr_Insane
22
Years of Service
User Offline
Joined: 14th Nov 2002
Location: United States
Posted: 1st Feb 2003 03:26
bump again.. I wonder, does anyone really understand my question?

Login to post a reply

Server time is: 2025-08-08 11:44:45
Your offset time is: 2025-08-08 11:44:45