Page 1 of 1
Caduceus parameters
Posted: Thu Sep 03, 2009 8:29 am
by Alex
Hi Commanders,
I was wondering if anyone could tell me what the parameters for the turret guns are about.
<key>subentities</key>
<array>
<string>caduceusturret 8.5 -0.2 46.6 1 0 -1 0</string>
I guess the first are XYZ coordinates for fied of fire?? maybe. but the last 2 or is it 4? (1 0 -1 0) Think it's 4 coz the spaces.
I'm a total newbe at playing around with the code so any help would be great.
Happy Hunting
Al
Posted: Thu Sep 03, 2009 8:33 am
by Thargoid
First three are its position on the model (relative to the model's centre) and the last four are a quaternion indicating which way it should face.
Further reading (on the wiki):
Subentities.
Quaternions.
plus a whole host of web pages on the latter (Google is your friend).
Enjoy
Posted: Thu Sep 03, 2009 8:36 am
by Diziet Sma
Posted: Thu Sep 03, 2009 8:53 am
by Alex
Err... Thanks Commanders,
Thought I was done with calculus 20 years ago.
Wonder if I still have they old text books?
I'll give the stuff you put me on to a read through and see how much I've forgot.
Happy hunting
Al
Posted: Thu Sep 03, 2009 9:03 am
by Commander McLane
However, the most important link would be to the documentation of shipdata.plist:
http://wiki.alioth.net/index.php/Shipdata.plist
which doesn't only tell you what the seven numbers are for, and links you to understanding what vectors and quaternions are, but also answers all your other question about anything you find in shipdata.plist.
Really, it is worth looking into the documentation. People have written the Elite Wiki, so that newbies get everything on a silver platter.
Posted: Thu Sep 03, 2009 11:18 am
by Thargoid
...which is why it's the first of my two links above, going specifically to the subentities entry on said plist .
But the advice to read and inwardly digest the wiki is spot on the credits, and vital to understanding what's going on under the surface of the game.
Posted: Thu Sep 03, 2009 11:35 am
by ClymAngus
If you do need a handy dandy xl Quaternion calculator. Follow my signature link.
Posted: Thu Sep 03, 2009 11:54 pm
by Alex
I know this will be a really silly Q. But are ships built along the X or Z axis? And do the given dimensions relate directly to the same coordinates?
<key>weapon_position_aft</key>
<string>0.0 9.058021 -44.120069</string>
In my thinking the 0.0 says it's dead centre aft then 9.05 up the tail, but then -44.1?? put's it wayout on the left tail wing as looking at the ship from the back, assuming it's built along the X axis??
Still haven't got my head around the W,X,Y,Z thing yet. There isn't an idiots guide is there?
Haven't done any real math sice I left tech collage about 83. bearly remember what cos sin tan are.
As you may have guessed, I'm trying to replace my aft M.laser with a couple of turrets.
Absolutly hopeless trying to fire back, can't seem to get my head around doing it in reverse, only been trying for a year and not getting any better.
Posted: Fri Sep 04, 2009 7:51 am
by Eric Walch
Alex wrote:I know this will be a really silly Q. But are ships built along the X or Z axis? And do the given dimensions relate directly to the same coordinates?
Ships nose is Z and top is X. (I can't remember were Y points
)
Posted: Fri Sep 04, 2009 8:24 am
by Thargoid
Eric Walch wrote:Alex wrote:I know this will be a really silly Q. But are ships built along the X or Z axis? And do the given dimensions relate directly to the same coordinates?
Ships nose is Z and top is X. (I can't remember were Y points
)
Half-right I'm afraid...
If you imagine you're sitting in the cockpit of the ship facing forwards, the axes are as follows:
X - left-right (wingtip to wingtip), +X is to the right/starboard.
Y - up-down (top to bottom), +Y is upwards.
Z - front-back (fore to aft), +Z is forward towards the nose (as Eric says).
Basically they're a standard cartesian co-ord set, with the ship pointing along +Z and the other two at right-angles to that.
So your <string>0.0 9.058021 -44.120069</string> is dead-centre along X (middle of the ship horizontally left-to-right), a little over 9m along Y (up above your head) and -44m along Z (back of the ship near the aft/tail).
As to quaternions, the links already provided are about as simple as it gets. Start with the Oolite wiki page and the wikipedia one, and then if that doesn't have your brain crawling out of your ears and begging for mercy then venture further afield on t'internet. Also ClymAngus's aforementioned Excel sheet is highly useful here, both for calculations and just playing around to try and understand the damn things.
Oh and one final tip, don't be afraid to just use your fingers, start by pointing forward (along Z) and then do your rotations individually and see where you end up pointing to. Also remember to only rotate in one axis at a time, and that the order of doing the rotations if you're doing multiple is important (try it and see using the finger-pointing method).
Posted: Fri Sep 04, 2009 10:14 am
by Alex
Thanks Thargoid,
Now the wiki pages make a lot more sense and explains why I didn't seem to be able to get the thingies in the right place. Don't know why I assumed the main direction axis to be X.
Your not far wrong about the quaternions, just trying to spell it almost makes my brains bleed.
I like the finger pointing idea, tried it straight away and makes the axis rotations seem a lot more obvious.
Well bake to trying to understand the quaternion thingies.
Happy hunting, well err.. maybe not so happy for thargoids though...
Al
Posted: Fri Sep 04, 2009 10:43 am
by Alex
BING
Light finally went on.
recon it was using the finger pointing that done it.
Thanks guys.
just need tosee if I can make it work now.
Happy hunting
Al
Posted: Fri Sep 04, 2009 11:10 am
by ClymAngus
Try redirecting an exterior camera some time. Now that's what I call fun and games with object positioning quaternions and spatial rotation.
Posted: Fri Sep 04, 2009 11:11 am
by Thargoid
Amazing what waving your hands around like a loon can actually achieve in these circumstances.
Also the other thing to remember is when you're rotating around an axis, your co-ordinate in that axis doesn't actually change. For example if you're rotating around X, it's equivalent to moving the nose of the ship up or down (pitching). So the co-ordinate of the tip of the nose (for example, applies to any point) will change in Y and Z, but not X.
Simplest way to think about it is by holding a pencil or something like that in your hand to signify the axis you want to rotate around, and then go handwaving again...