Ship Dock Orientation

Discussion and information relevant to creating special missions, new ships, skins etc.

Moderators: winston, another_commander

Post Reply
User avatar
mandoman
---- E L I T E ----
---- E L I T E ----
Posts: 1375
Joined: Thu Apr 28, 2011 3:17 pm

Ship Dock Orientation

Post by mandoman »

I've been working on trying to get the dock I built specifically for my Andricothere ship oriented correctly, but nothing I try gets it leveled correctly. If I use "1, 0, 0, 0", it sits up on the the edge. I don't know if it's the port edge, or starboard edge, but it's oriented into the dock slit like that with those numbers. The same goes for "-1, 0, 0, 0". I have tried every other combination I can think of, and a couple almost gets it into place....but not quite. I just can't seem to get it to level off at the docking point on the ship, and face the correct direction, at the correct angle. I've been studying Quaternions till I'm cross eyed, and I just can't get it.

The funny thing is that I got all of the ball turrets situated correctly. Go figure. :roll:
Mandotech Industries Wiki Page.

http://wiki.alioth.net/index.php/User:Mandoman
User avatar
mandoman
---- E L I T E ----
---- E L I T E ----
Posts: 1375
Joined: Thu Apr 28, 2011 3:17 pm

Re: Ship Dock Orientation

Post by mandoman »

Here is a picture of the closest I've got to getting the dock into place:

Image

That was with the orientation numbers "0, 0, -1, 0". If anyone has any advice, I would love to hear it. Thanks.
Mandotech Industries Wiki Page.

http://wiki.alioth.net/index.php/User:Mandoman
User avatar
Thargoid
Thargoid
Thargoid
Posts: 5528
Joined: Thu Jun 12, 2008 6:55 pm

Re: Ship Dock Orientation

Post by Thargoid »

A 90 degree clockwise rotation around Z is 0.7071 0 0 0.7071 and a 90 degree anticlockwise is -0.7071 0 0 0.7071. One or other of those may be what you're looking for (depending which way up your dock is defined).

The quaternions used are normalised (w^2+x^2+y^2+z^2 = 1).

Is it not possible to have both in blender at once and use that to know what angles (and around which axes) you need to make a rotation? If you can provide the rotations and axes then I can use the Excel sheet to calculate the appropriate quaternion for you.
User avatar
mandoman
---- E L I T E ----
---- E L I T E ----
Posts: 1375
Joined: Thu Apr 28, 2011 3:17 pm

Re: Ship Dock Orientation

Post by mandoman »

Thargoid wrote:
A 90 degree clockwise rotation around Z is 0.7071 0 0 0.7071 and a 90 degree anticlockwise is -0.7071 0 0 0.7071. One or other of those may be what you're looking for (depending which way up your dock is defined).

The quaternions used are normalised (w^2+x^2+y^2+z^2 = 1).

Is it not possible to have both in blender at once and use that to know what angles (and around which axes) you need to make a rotation? If you can provide the rotations and axes then I can use the Excel sheet to calculate the appropriate quaternion for you.
I know those numbers, but never thought of using them for a dock. It seems weird when there is no rotation involved. I'll plug them in, and find out. I actually made the dock by first opening the Andricothere in Blender, then adding a cube from the menu, and molded the cube into the correct dimensions to fit the docking slit on the ship. So the dock SHOULD be exact. That's never helped me before, though. :D
Mandotech Industries Wiki Page.

http://wiki.alioth.net/index.php/User:Mandoman
Post Reply