Oolite Trunk version 2717
I think there's a problem with the weapon_position_forward key on subentities, it's being ignored. Subentities if given a forward laser seem to fire from their parents origin position.
You can quickly test this using the griff_normalmapped_anaconda ( http://www.box.net/shared/rpkms25cc9 ).
The NPC versions have no laser of their own, instead they have a small subentity positioned on their nose, this subentity has a pulse laser weapon type and a forward weapon position key in its shipdata.plist definitions yet when it fires the laser seems to come from the middle of the main hull not the position specified.
It's not all bad news though, laser positioning works properly on ships that don't use subentities for their guns
Trunk: weapon position forward on subentites not working
Moderators: winston, another_commander, Getafix
- Eric Walch
- Slightly Grand Rear Admiral
- Posts: 5536
- Joined: Sat Jun 16, 2007 3:48 pm
- Location: Netherlands
Re: Trunk: weapon position forward on subentites not working
I had just a battle with some Imperial couriers and trunk 2717. I did not notice anything weird with their lasers on subs. Also the griff kraits gave me two beams. So probably there is something else?Griff wrote:Oolite Trunk version 2717
I think there's a problem with the weapon_position_forward key on subentities, it's being ignored. Subentities if given a forward laser seem to fire from their parents origin position.
You can quickly test this using the griff_normalmapped_anaconda ( http://www.box.net/shared/rpkms25cc9 ).
UPS-Courier & DeepSpacePirates & others at the box and some older versions
Re: Trunk: weapon position forward on subentites not working
Seconded...Griff wrote:Oolite Trunk version 2717
I think there's a problem with the weapon_position_forward key on subentities, it's being ignored. Subentities if given a forward laser seem to fire from their parents origin position.
You can quickly test this using the griff_normalmapped_anaconda ( http://www.box.net/shared/rpkms25cc9 ).
The NPC versions have no laser of their own, instead they have a small subentity positioned on their nose, this subentity has a pulse laser weapon type and a forward weapon position key in its shipdata.plist definitions yet when it fires the laser seems to come from the middle of the main hull not the position specified.
It's not all bad news though, laser positioning works properly on ships that don't use subentities for their guns
@Eric I think both your test scenarios are not using
Code: Select all
weapon_position_forward ="x y z";
My Polaris class destroyer is using 21 military lasers as a forward super laser...
So I tried adding the entry
Code: Select all
weapon_position_forward ="1000 1000 1000";
Code: Select all
"Frame_Military_gun" =
{
ai_type = "nullAI.plist";
energy_recharge_rate = 0;
max_energy = 1;
forward_weapon_type = "WEAPON_MILITARY_LASER";
model = "missile.dat"; //looks nice will be changed ;.)
name = "Military Laser";
weapon_position_forward ="1000 1000 1000";
roles = "FrameSubEntMilitaryLaser";
};
So Griff you would need to split the engine from the gun section.. if you can
Bounty Scanner
Number 935
Number 935
Laser positioning is 'a bit' delicate, so I wouldn't want to change that code in haste.
However, subentities lasers should fire from the centre (0,0,0) of the subentity itself, not of the ship they're attached to.
If you move the subentity about, so that its origin in wings3d (or equivalent) is - say - a few metres to the left of it, you should be able to see the laser fired from that off-centre position.
Hope this helps,
Kaks.
However, subentities lasers should fire from the centre (0,0,0) of the subentity itself, not of the ship they're attached to.
If you move the subentity about, so that its origin in wings3d (or equivalent) is - say - a few metres to the left of it, you should be able to see the laser fired from that off-centre position.
Hope this helps,
Kaks.
Hey, free OXPs: farsun v1.05 & tty v0.5! :0)
- Griff
- Oolite 2 Art Director
- Posts: 2483
- Joined: Fri Jul 14, 2006 12:29 pm
- Location: Probably hugging his Air Fryer
ah, i just remembered, the tiny gun at the front of the anaconda and the 3 engines way over at the back of the ship are the same subentity, so that's why it looked like it was firing from the centerpoint of the main ship - i'll follow frame's advice and split the engines & the gun into 2 subentities things will be OK!
edit: ah, i see what you mean Kaks, shift the gun model in wings so the point i want the laser to fire from is at 0,0,0 and then shift the model back into the correct place in the subentites section of the main ship, fiendishly clever stuff!
edit: ah, i see what you mean Kaks, shift the gun model in wings so the point i want the laser to fire from is at 0,0,0 and then shift the model back into the correct place in the subentites section of the main ship, fiendishly clever stuff!
Yes, that's what I meant!Griff wrote:shift the gun model in wings so the point i want the laser to fire from is at 0,0,0 and then shift the model back into the correct place in the subentites section of the main ship, fiendishly clever stuff!
Frame's solution is just as good though, and it's got the bonus of being less fiendishly 'clever' too!
Hey, free OXPs: farsun v1.05 & tty v0.5! :0)
I saw they where connected(gun and engine) in my model viewer... But I know... You are on Mac..
Bounty Scanner
Number 935
Number 935