Quaternion Question

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: 1385
Joined: Thu Apr 28, 2011 3:17 pm

Quaternion Question

Post by mandoman »

I've been looking around the Internet at other examples of games using ball turrets, and one thing I keep stumbling over is something I don't see in the Oolite HowTo on Quaternions. It's the reference to determining the rotation of a ball turret on the Y axis, OFFSET by the X axis. This seems to be referring to how the turret acts when facing outward from the side/top/bottom of the ship, which is one of my biggest roadblocks at the moment. It has always seemed to me that a ball turret, unless pointing straight up or down, is always rotating on the Y axis......except I keep running into the X axis problem when the ball turrets are way off to one side, or the other from the center of the ship.

Does the Quaternion calculators provided for use in figuring Quaternions for Oolite already have this factor built in to the equation? I know on one ship I have made, and now maybe two, that the ball turrets I have pointing any direction other than straight forward, or straight back, don't point out straight from the origin, but rather tilt radically toward one side, or the other, and sometimes even backwards, in toward the ship. It feels like I almost have a grasp on this, but I just can't resolve those X axis offsets. Anyone care to enlighten me? Thanks. :)
Mandotech Industries Wiki Page.

http://wiki.alioth.net/index.php/User:Mandoman
User avatar
Smivs
Retired Assassin
Retired Assassin
Posts: 8408
Joined: Tue Feb 09, 2010 11:31 am
Location: Lost in space
Contact:

Re: Quaternion Question

Post by Smivs »

Hi Mandoman.
my new WonderWorm has side turrets. I'm no expert at these but I got them going by trial and error. It might be of some help or give you some insight if you had a look at the shipdata in it.
Commander Smivs, the friendliest Gourd this side of Riedquat.
User avatar
mandoman
---- E L I T E ----
---- E L I T E ----
Posts: 1385
Joined: Thu Apr 28, 2011 3:17 pm

Re: Quaternion Question

Post by mandoman »

Smivs wrote:
Hi Mandoman.
my new WonderWorm has side turrets. I'm no expert at these but I got them going by trial and error. It might be of some help or give you some insight if you had a look at the shipdata in it.
*************** :lol: *********************

I'm sorry Smivs, but what a riot. that little bugger is one big ballturret, :lol: .

Thanks for the lead. :D
Mandotech Industries Wiki Page.

http://wiki.alioth.net/index.php/User:Mandoman
User avatar
Smivs
Retired Assassin
Retired Assassin
Posts: 8408
Joined: Tue Feb 09, 2010 11:31 am
Location: Lost in space
Contact:

Re: Quaternion Question

Post by Smivs »

Hehe....it's your fault really :wink: I got the idea while debating uber-ships with you on another thread :P
Commander Smivs, the friendliest Gourd this side of Riedquat.
User avatar
mandoman
---- E L I T E ----
---- E L I T E ----
Posts: 1385
Joined: Thu Apr 28, 2011 3:17 pm

Re: Quaternion Question

Post by mandoman »

Smivs wrote:
Hehe....it's your fault really :wink: I got the idea while debating uber-ships with you on another thread :P
Hah! Rubbing off on you, eh? :D
Mandotech Industries Wiki Page.

http://wiki.alioth.net/index.php/User:Mandoman
User avatar
Eric Walch
Slightly Grand Rear Admiral
Slightly Grand Rear Admiral
Posts: 5536
Joined: Sat Jun 16, 2007 3:48 pm
Location: Netherlands

Re: Quaternion Question

Post by Eric Walch »

the few times I added ball turrets, I noticed it is quite difficult to see if they are added in a correct rotation because they tend to rotate themselves. The trick I used it to start adding them as plain subentities. Than its easier to visually check the correct orientation. And with the console it is possible to play a bit with the position and orientation property until satisfying.

e.g. by typing: player.ship.target.subEntities[0].orientation = [w,x,y,z]

When everything seems okay, make them turrets again.
User avatar
mandoman
---- E L I T E ----
---- E L I T E ----
Posts: 1385
Joined: Thu Apr 28, 2011 3:17 pm

Re: Quaternion Question

Post by mandoman »

Eric Walch wrote:
the few times I added ball turrets, I noticed it is quite difficult to see if they are added in a correct rotation because they tend to rotate themselves. The trick I used it to start adding them as plain subentities. Than its easier to visually check the correct orientation. And with the console it is possible to play a bit with the position and orientation property until satisfying.
When everything seems okay, make them turrets again.
That's good advice. I have yet to learn how to work with the console. I try to give it commands using the instructions I can find, but I always get something like "syntax error", or "no such thing as". Is there a comprehensive guide somewhere on using it? I have read the ReadMe in the oxp, and I guess I'm just not understanding it. What ever, thanks for the advice. I WILL take it seriously. :)
Mandotech Industries Wiki Page.

http://wiki.alioth.net/index.php/User:Mandoman
User avatar
Gimi
---- E L I T E ----
---- E L I T E ----
Posts: 2073
Joined: Tue Aug 29, 2006 5:02 pm
Location: Norway

Re: Quaternion Question

Post by Gimi »

mandoman wrote:
That's good advice. I have yet to learn how to work with the console. I try to give it commands using the instructions I can find, but I always get something like "syntax error", or "no such thing as". Is there a comprehensive guide somewhere on using it? I have read the ReadMe in the oxp, and I guess I'm just not understanding it. What ever, thanks for the advice. I WILL take it seriously. :)
I second this. I use the console, but it's more or less a hit and miss thing. Good instructions, with examples, would be very much appreciated.
"A brilliant game of blasting and trading... Truly a mega-game... The game of a lifetime."
(Gold Medal Award, Zzap!64 May 1985).
Post Reply