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 Professional Discussion / Rotation problems - simple test

Author
Message
Milamber
16
Years of Service
User Offline
Joined: 27th Sep 2002
Location: Australia
Posted: 4th Oct 2002 08:29
Try this:



Why does that last turn command appear to first undo the rotate object command??? Will this be fixed with patch 2?
System Specs: AMD Athlon 1700+ XP, GA-7VRX motherboard, 128MB DDR RAM, GeForce2 MX400 64MB VRAM
Zed
16
Years of Service
User Offline
Joined: 20th Sep 2002
Location:
Posted: 4th Oct 2002 10:12
You couldn't mix and match rotate with the free flight commands in DB and I'd guess you cant in DBpro. The two are used for very different reasons so I cant think of a reason why you would.

You could try fixing the objects pivot after the rotate it may get the result you after.

Zero
16
Years of Service
User Offline
Joined: 28th Aug 2002
Location: Finland
Posted: 4th Oct 2002 11:59
I really need those turn/pitch/roll object commands and need them to work as in DB#1 because it happens to be the best way in some cases when have to solve rotations not independent to rotations made before.

The evil plan is now even closer!
- - - - - - - - - - - - - - - - - - - -
Specs:- P3 550 Nvidia TNT2M64, 192Mb RAM
The Wendigo
16
Years of Service
User Offline
Joined: 13th Sep 2002
Location: A hole near the base of a tree in the US
Posted: 5th Oct 2002 04:01
I got good news and really bad news. The good news is that there is a command called something like set rotation zyx (i think, it's in the help under BASIC3D) and that should allow you to do free flight rotation using the 'rotate object' commands. The bad new: It currently doesn't work right now. Me and others are desperately hoping they will fix this in patch 2.

1.00 GHZ processor, 256 MB RAM, GeForce 3 64MB, SB Live!, 8 cans of soda per day
Zed
16
Years of Service
User Offline
Joined: 20th Sep 2002
Location:
Posted: 5th Oct 2002 10:44
set object rotation will not give you free flight from the rotate object command as they work on world axies and free flight requires commands that on the models axies.

The only problem with the free flight rotation cammands that I know of is that they work in radians rather than degrees at the moment and the move object command doesn't move the object along its Z axis like it should.

Milamber
16
Years of Service
User Offline
Joined: 27th Sep 2002
Location: Australia
Posted: 6th Oct 2002 04:51
And with free flight rotation, how do you expect to return it to the starting orientation, say before the next level begins? I don't want to fix object pivot, I want to rotate it back to 0,0,0. The only command to do this is rotate object, unless you want to muck around finding the current x, y, and z rotations and turning them that much back, but that's messy. Both systems of rotation may be independent, and they may work differently, but one should not first undo the rotation of the other when you use it. Once you rotate an object, it should stay rotated until you specifically use a command to reverse that rotation.

System Specs: AMD Athlon 1700+ XP, GA-7VRX motherboard, 128MB DDR RAM, GeForce2 MX400 64MB VRAM
Zero
16
Years of Service
User Offline
Joined: 28th Aug 2002
Location: Finland
Posted: 6th Oct 2002 13:32
Just heard the turn/pitch/roll commands will be fixed in patch2. Makes me happy

The evil plan is now even closer!
- - - - - - - - - - - - - - - - - - - -
Specs:- P3 550 Nvidia TNT2M64, 192Mb RAM
Zed
16
Years of Service
User Offline
Joined: 20th Sep 2002
Location:
Posted: 6th Oct 2002 13:44
I'm not 100% about this but from some work I did in VB5 a couple of years ago this is how I understand things to work.

If you rotate about the world axies you just apply the rotations x,y then z (or z, y then x) to the base model one ather the other and create a new (rotated) model to render. This is done every time you render.

Free flight works a little differently. You start bye creating an orientation matrix (3x3 or 4x4 if you include scale)

100
010
001

All your rotations are carried out on this but to make things a little more complicated you x,y and z rotations are based on the the orientation matrix so rotate alond the z axis by 180 degrees and the matrix changes to.

-1 0 0
0 -1 0
0 0 1
Now the x vector is pointing in the opposite

After all your rotations you then multiply each vertex and normal in the original model by the new orientation matrix to create a new one for rendering.

All further ratations are done to the new orientation matrix.

As you can see each method works by applying a rotation to the base model so mixing them does not work.

If you want to set the rotation back to 0,0,0 either delete and reload the object or at the start use set object to object orientation on a hidden object then set your objects orientation back to that of the hidden object whenever required.

If this doesn't make sense, sorry but it makes my head hurt trying to explain it

Login to post a reply

Server time is: 2019-07-18 02:22:39
Your offset time is: 2019-07-18 02:22:39