Page 1 of 1
Sub-ent Gun Prob
Posted: Thu Dec 28, 2023 4:37 pm
by Killer Wolf
This goddamn OXP is fighting me every step of the way >:-(
i'm trying to give a ship dual lasers, as i did w/ my Vampires. copied the stuff into the shipdata list, mapped the positions of the gun muzzles, and it's not working. i've got;
Code: Select all
"test_rgun" =
{
ai_type = "nullAI.plist";
model = "rgun.dat";
name = "test";
roles = "subent";
forward_weapon_type = "WEAPON_BEAM_LASER";
weapon_position_forward = "11.0 -5.8 67.8";
laser_color = "redColor";
};
and an equivalent "lgun" for the other side using -11.0 for the 'x' value.
it's not working; both lasers are off to the right side but further out than 11, yet - if i paste those coordinates into a flasher, they appear exactly at the gun muzzles where i want them. you cas see here, including the two yellow flashers where the guns are supposed to be
what's throwing off the laser position, anyone got a clue??
TIA
Re: Sub-ent Gun Prob
Posted: Thu Dec 28, 2023 8:50 pm
by phkb
What happens if you take out the weapon_position_forward value?
Re: Sub-ent Gun Prob
Posted: Thu Dec 28, 2023 8:59 pm
by Cholmondely
Oh! And now that Phkb has said something intelligent, I hope that you both had an utterly spiffing Xmas!
Re: Sub-ent Gun Prob
Posted: Thu Dec 28, 2023 9:18 pm
by Killer Wolf
phkb wrote: ↑Thu Dec 28, 2023 8:50 pm
What happens if you take out the weapon_position_forward value?
?
i haven't tried. what benefit would that do, it then wouldn't have any co-ordinates at all to work w/?
Re: Sub-ent Gun Prob
Posted: Thu Dec 28, 2023 9:49 pm
by phkb
The position values you put into a subentity are relative to *that* subentity. And when that subentity is added to a parent object (ie your primary ship) all the position values are adjusted based on the position given to the subentity.
However, you seem to have put the position of the laser relative to the primary ship, *not* the subentity. Does that make sense? What I've saying is, the weapon_position_forward value, as defined in the subentity, should be relative to the subentity.
Re: Sub-ent Gun Prob
Posted: Thu Dec 28, 2023 9:51 pm
by phkb
By removing the weapon_position_forward value (which would then default to 0, 0, 0) you might find the lasers are positioned better.
Re: Sub-ent Gun Prob
Posted: Thu Dec 28, 2023 9:52 pm
by phkb
Cholmondely wrote: ↑Thu Dec 28, 2023 8:59 pm
And now that Phkb has said something intelligent
I guess it had to happen sometime! I'll blame Christmas for all the unintelligent responses!
Re: Sub-ent Gun Prob
Posted: Thu Dec 28, 2023 9:54 pm
by cbr
phkb wrote: ↑Thu Dec 28, 2023 9:49 pm
However, you seem to have put the position of the laser relative to the primary ship, *not* the subentity. Does that make sense? What I've saying is, the weapon_position_forward value, as defined in the subentity, should be relative to the subentity.
And the flasher is a point source and not a model like the gun.dat with a size?
Re: Sub-ent Gun Prob
Posted: Thu Dec 28, 2023 9:55 pm
by phkb
cbr wrote: ↑Thu Dec 28, 2023 9:54 pm
And the flasher is a point source and not a model like the gun.dat with a size?
I suspect KW put the flasher on the primary ship, not on the subentity. The values we has are correct when entered on the primary object (the "parent", I guess you'd say), but not in the subentity.
Re: Sub-ent Gun Prob
Posted: Fri Dec 29, 2023 9:33 am
by Killer Wolf
huh. that hasn't been how it always was though, has it? My lasers on the Dominatrix etc worked fine, as far as i recall?
i've always modelled the ships, split the guns into separate models and used the co-ordinates for positioning as i do the Flashers, based on where they are in 3D space around the model. all the vertex positions for the guns are the same as they are for the total model, ie relative to the origin of 3D space which is central to the ship for handling characteristics etc. where does the origin get shifted to on the sub-ents, central to a bounding box or such? if so it makes accurate placing a lot more fiddly.
EDIT - got it. errant vertex was off one side, not sure why that would throw off vertext coordinates but i've zapped it and the guns look okay.
ah, the joys of ship building.