Page 12 of 13
Re: Griff ships with player-defined decals
Posted: Sun Feb 27, 2011 1:20 am
by Commander McLane
El Viejo wrote:Let me know if you figure out how to manipulate those co-ords, please.
I have a specific view in mind, but can't get my old brain round them.
The position is simply xyz-coordinates from the origin of your ship. x = right-left; y = up-down; z = front-aft.
The orientation is a quaternion which specifies the direction of the view.
Re: Griff ships with player-defined decals
Posted: Sun Feb 27, 2011 1:22 am
by Cody
I love the way you say 'simply' McLane... at my age, only falling over is simple.
Re: Griff ships with player-defined decals
Posted: Sun Feb 27, 2011 1:41 am
by Commander McLane
El Viejo wrote:I love the way you say 'simply' McLane... at my age, only falling over is simple.
You note that I left the moniker out in the quaternions part.
Re: Griff ships with player-defined decals
Posted: Sun Feb 27, 2011 10:48 am
by Griff
oops, the gun wasn't supposed to be destroyable, i'm glad El Viejo remembered the fix because i'd completely forgotten it, the same bug was in the player flyable companion oxp i uploaded the other day, and probably explains why the gun on the mamba wasn't showing up, i've updated that oxp and the cobraIII multidecal to add in the frangible=false line, the multidecal cobraIII has also had it's engine glowmap updated to take out the orangey glow
Re: Griff ships with player-defined decals
Posted: Sun Feb 27, 2011 12:30 pm
by JensAyton
Commander McLane wrote:Is it possible in Oolite 1.75 to make only some subentities frangible?
No.
Commander McLane wrote:Or will it be possible in the future?
Probably.
Re: Griff ships with player-defined decals
Posted: Sun Feb 27, 2011 1:33 pm
by Eric Walch
Commander McLane wrote:El Viejo wrote:I love the way you say 'simply' McLane... at my age, only falling over is simple.
You note that I left the moniker out in the quaternions part.
And even that is simple when using the console to do the calculations for you. Just type:
Code: Select all
Vector3D(x, y, z).direction().multiply(-1).rotationTo(Vector3D(0,0,1))
x, y, z are the 3 coordinates you used in the position. This will give a quaternion pointing to the centre of the ship. When you don't want to look to the centre but to a specific other point you need:
Code: Select all
Vector3D(x2, y2, z2).subtract(Vector3D(x1, y1, z1)).direction().rotationTo(Vector3D(0,0,1))
Point 1 is were you looking from and point 2 is were you looking at. This resulting vector must be transformed to a unit vector with the
direction()
method
No need to understand the math in it, just type it in the console and use the result you get.
(It could be that rotationTo() has a bug. At least something this function relied on had a bug that is fixed in the current nighties)
Re: Griff ships with player-defined decals
Posted: Sun Feb 27, 2011 1:38 pm
by Cody
Thanks Eric... I'm tempted to ask what console, as I've never used it, but that would be a bit flippant.
I will try and get my old brain round this stuff... one fine day.
Re: Griff ships with player-defined decals
Posted: Sun Feb 27, 2011 1:45 pm
by Commander McLane
Eric Walch wrote:Code: Select all
Vector3D(x2, y2, z2).subtract(Vector3D(x1, y1, z1)).direction().rotationTo(Vector3D(0,0,1))
Point 1 is were you looking from and point 2 is were you looking at. This resulting vector must be transformed to a unit vector with the
direction()
method
No need to understand the math in it, just type it in the console and use the result you get.
Now
that's what I call convenience.
Re: Griff ships with player-defined decals
Posted: Sun Feb 27, 2011 3:35 pm
by Eric Walch
Commander McLane wrote:Now
that's what I call convenience.
The only dis-convenience could be that one parameter is missing. You look in the right direction, but you might look at it upside down
That means you still have to experiment a bit with it. Take the rotate command and rotate it as much around the vectorForward() of the found orientation, till it feels alright.
I must say I discovered that command only yesterday and used it today for view points for the first time. And now I hit the bug in 1.75.0 myself: I got back [1,0,0,0] as result. It is the same bug that sends the thargoid lasers sometimes in the wrong direction as reported by you yesterday. Both bugs are already fixed in the current nighty.
Re: Griff ships with player-defined decals
Posted: Thu Mar 24, 2011 8:11 pm
by Cody
At last, after being grounded for over a month, I’ve had a chance to fly your latest scuffed multi-decal Cobra III, Griff.
The fore gun subent doesn’t glow red when the laser overheats, as it did previously.
Line 150 of its shipdata.plist should read:
Code: Select all
"griff_cobra_mk3_scuffed_front_gun_diffuse_spec.png" =
not:
Code: Select all
"griff_cobra_mk3_scuffed_mainhull_diffuse_spec.png" =
(I think… it seems to fix it anyway).
Otherwise, it’s really great…
Rolling Thunder looks terrific with the new ‘scuffed’ paintjob... thanks Griff.
Re: Griff ships with player-defined decals
Posted: Thu Mar 24, 2011 8:35 pm
by Gimi
El Viejo wrote:At last, after being grounded for over a month, I’ve had a chance to fly your latest scuffed multi-decal Cobra III, Griff.
The fore gun subent doesn’t glow red when the laser overheats, as it did previously.
Line 150 of its shipdata.plist should read:
Code: Select all
"griff_cobra_mk3_scuffed_front_gun_diffuse_spec.png" =
not:
Code: Select all
"griff_cobra_mk3_scuffed_mainhull_diffuse_spec.png" =
(I think… it seems to fix it anyway).
Otherwise, it’s really great… Rolling Thunder looks terrific with the new ‘scuffed’ paintjob... thanks Griff.
I think the same error is present in the normal cobra. Do you have the solution to that one as well
Edit: Hmm, just checked, and it looks ok, but I seem to remember it not working. Need to check again.
Re: Griff ships with player-defined decals
Posted: Fri Mar 25, 2011 1:31 pm
by Griff
El Viejo wrote:Line 150 of its shipdata.plist should read:
Code: Select all
"griff_cobra_mk3_scuffed_front_gun_diffuse_spec.png" =
not:
Code: Select all
"griff_cobra_mk3_scuffed_mainhull_diffuse_spec.png" =
(I think… it seems to fix it anyway).
It's highly likely that i've made some sort of Copy & Paste error when i was putting together the oxp, i'll have a check this evening and get it updated, BTW, El Viejo did you have a look at the CobraIII with missiles OXP that Thargoid worked on? pretty cool stuff!
Re: Griff ships with player-defined decals
Posted: Fri Mar 25, 2011 1:34 pm
by Cody
I've installed that OXP Griff, but haven't spotted one yet.
Could some kind soul remind me which bit of code I have to change in Oolite core, in order to have a spinning Griff Cobra at start-up.
Re: Griff ships with player-defined decals
Posted: Fri Mar 25, 2011 1:43 pm
by Griff
El Viejo wrote:I've installed that OXP Griff, but haven't spotted one yet.
I forgot they might be rare, i kept spawning them in groups of 6 outside the station when i was testing the oxp.
Have a look here re: spinning cobraIII at startup
https://bb.oolite.space/viewtopic.ph ... 44#p133744
you might need to ammend the like_ship reference though if you're using the scuffed cobra or the multidecal one
Re: Griff ships with player-defined decals
Posted: Fri Mar 25, 2011 2:45 pm
by Cody
Thanks Griff... I missed that post while I was off-line recently.
I just named that code snippet 'shipdata.plist' and dropped it into the Config folder in my AddOns folder... perfect.