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 / A little problem with my F-16

Author
Message
DARKGuy
21
Years of Service
User Offline
Joined: 28th Nov 2003
Location:
Posted: 2nd Feb 2004 06:14
I'm in a little hurry, so I'll explain faster:

I'm using the "Joystick Flight Sim" code snippet controls (great help!) but when I try to align the plane to the matrix (so you can't crash (for testing and "beginner mode" code)) and use "xrotate object 1,0" doesn't work, because my plane always align to the left (or to the 0 x rotation) so I need help on that...anyone?

thanks in advance

::·· Intel Pentium II 300 Mhz, Sound Blaster AWE 32, 5 Gb HD, SiS 8 Mb video card, Windows 98 and 64 Mb RAM ··::
Travis
21
Years of Service
User Offline
Joined: 9th Nov 2003
Location: West Aust.
Posted: 2nd Feb 2004 10:40
ill jsut beat everyone to say this... we need to look at your code so we can help you...
DARKGuy
21
Years of Service
User Offline
Joined: 28th Nov 2003
Location:
Posted: 2nd Feb 2004 15:05
Alright, no prob . Here it is:



::·· Intel Pentium II 300 Mhz, Sound Blaster AWE 32, 5 Gb HD, SiS 8 Mb video card, Windows 98 and 64 Mb RAM ··::
DARKGuy
21
Years of Service
User Offline
Joined: 28th Nov 2003
Location:
Posted: 3rd Feb 2004 03:36
:bump: anyone here?

::·· Intel Pentium II 300 Mhz, Sound Blaster AWE 32, 5 Gb HD, SiS 8 Mb video card, Windows 98 and 64 Mb RAM ··::
Mucky Muck Ninja
21
Years of Service
User Offline
Joined: 4th Sep 2003
Location: im not entirely sure
Posted: 3rd Feb 2004 03:58
Lol your gonna have to wait more than a few hours. Anyway, This is a guess but if your model isn't rotated the way you want it when you load it. EX: its facing left instead of forward before you change the rotation then you need to fix its pivot. For example if its pointing down when you load it you have to change its default rotation to be facing forward
Load object "Your jet.3ds",ObjNumber
Xrotate object ObjNumber,270
Fix object pivot ObjNumber

Am I an Idiot...or is everyone else just really smart?
Doucan
21
Years of Service
User Offline
Joined: 26th Nov 2003
Location: Vermont USA
Posted: 4th Feb 2004 03:49 Edited at: 4th Feb 2004 03:51
I didn't read your code because I'm a beginner but I did make a flighing game (If you could call it a game ) My plane kept banking when I didn't want it to. If that's your problem then just
put code in the loop that sets it's x and z angles at zero.

Of course, If your game's actually remotely realistic (unlike mine) , the angle of the plane would always turn unless you were yawing.

...How do you manage on a 5 GB hard Drive...

Doucan...

Completed Doucan movies: Doucan year of the Monkey, Doucan II: the revenge of Mortakia. Current project: Doucan movie DVD resoration. Progress: 20%
DARKGuy
21
Years of Service
User Offline
Joined: 28th Nov 2003
Location:
Posted: 4th Feb 2004 19:24 Edited at: 4th Feb 2004 19:25
no no no no no............that's not the problem..... it's this:

Plane angle: 45º

Ok, that's the plane angle...now I want that it aligns to the matrix but keeping the same angle. When I use "xrotate object 1,0" it puts like this:

New angle: 0º

It's always like this...and the model rotates correctly when I rotate it (turn object and so) so the model isn't the problem...

Quote: "...How do you manage on a 5 GB hard Drive..."


haha that's funny...I have W98 and DB installed...3DSMax 3..Heroes of Might and magic III, Messiah...and I've got free space!

::·· Intel Pentium II 300 Mhz, Sound Blaster AWE 32, 5 Gb HD, SiS 8 Mb video card, Windows 98 and 64 Mb RAM ··::
DARKGuy
21
Years of Service
User Offline
Joined: 28th Nov 2003
Location:
Posted: 5th Feb 2004 14:36
:bump again: anyoneeeeeee?

::·· Intel Pentium II 300 Mhz, Sound Blaster AWE 32, 5 Gb HD, SiS 8 Mb video card, Windows 98 and 64 Mb RAM ··::
Doucan
21
Years of Service
User Offline
Joined: 26th Nov 2003
Location: Vermont USA
Posted: 6th Feb 2004 01:07
I don't uderstand your problem

(Everyone's stupid in their own way, and the stupidest ones don't even know it)

Completed Doucan movies: Doucan year of the Monkey, Doucan II: the revenge of Mortakia. Current project: Doucan movie DVD resoration. Progress: 20%
DARKGuy
21
Years of Service
User Offline
Joined: 28th Nov 2003
Location:
Posted: 6th Feb 2004 14:57 Edited at: 6th Feb 2004 14:58
alright alright I'll explain in pictures: my plane is a 315º in the air (image 1). When the plane reachs the ground, I don't want it in the ground but aiming down (like image 2), I want it correctly alignated (like image 3), but keeping the same direction he was in the air, but in the ground. The problem is that when I use "xrotate object 1,0", ok, it gets aligned to the ground (like image 3) BUT it resets his orientation and it ends bad (like image 4).

I hope everyone understands now .

(oh and, please forgive the "kiddish" pictures... )

Image 1:


Image 2:


Image 3:


Image 4:


::·· Intel Pentium II 300 Mhz, Sound Blaster AWE 32, 5 Gb HD, SiS 8 Mb video card, Windows 98 and 64 Mb RAM ··::
Jess T
Retired Moderator
21
Years of Service
User Offline
Joined: 20th Sep 2003
Location: Over There... Kablam!
Posted: 6th Feb 2004 15:30
The difference between image 1, and image 4 shouldn't happen as that is the Y-axis, it is not effected in any way by the X or even the Z-axies.

What you want to be doing is first finding the angle the plain has with the x-axis, then find the angle it has with the z-axis, and compare them, and act acoordingly.

ie, you need to rotate the object slightly on BOTH axies untill the object ends up in the correct position ( as you need to compensate for both Pitch AND Roll, otherwise, there's no point really ).

That's about the limit of my knowledge I'm afraid.

Hope I Heleped...
Jess.


Team EOD :: Programmer/Logical Engineer/All-Round Nice Guy
Van B
Moderator
22
Years of Service
User Offline
Joined: 8th Oct 2002
Location: Sunnyvale
Posted: 6th Feb 2004 18:00
Well, take all those bloomin XRotate and ZRotate commands and get rid.

ROTATE LIMB

Does a much better job because you can rotate your main object, then rotate the limb on the other axis giving you mathematical control over your angles. For instance if you used the ROTATE OBJECT to rotate on the Y axis, you could rotate on the X and Z axis with ROTATE LIMB. You might need to check over your model planes to make sure the limb pivot is centred and all extra limbs are attached. Also - centre your model on the centre of gravity, often a schematic will show this, but you could probably guess quite near to the mark just by looking at the plane.



Van-B


The nature of Monkey was irrepressible!.
kevil
22
Years of Service
User Offline
Joined: 24th Nov 2002
Location: Netherlands
Posted: 6th Feb 2004 20:15
I made a flight sim once and I found out that it was easier to use the pitch/turn/roll commands instead of the rotate commands. They're much more suitable for flying games.

Kevil

Login to post a reply

Server time is: 2025-05-22 11:58:00
Your offset time is: 2025-05-22 11:58:00