Oolite test 1.73.4, WinXP Pro SP3 32bit:
Is the plasma turret's firing arc always a full hemisphere?
I'm making an OXP, and there's a special version of one ship - the special version has 3 turrets. 2 of them seem to behave as expected (placed rear, facing aft), but the 3rd one (placed top, facing forwards and 30 degrees up) ignores the ship - it tracks targets and fires at them through the ship's hull too.
Is there any way of restricting the firing arc?
Turret firing through ship
Moderators: winston, another_commander, Getafix
Turret firing through ship
...and keep it under lightspeed!
Friendliest Meteor Police that side of Riedquat
Far Arm ships
Z-ships
Baakili Far Trader
Tin of SPAM
Friendliest Meteor Police that side of Riedquat
Far Arm ships
Z-ships
Baakili Far Trader
Tin of SPAM
- Commander McLane
- ---- E L I T E ----
- Posts: 9520
- Joined: Thu Dec 14, 2006 9:08 am
- Location: a Hacker Outpost in a moderately remote area
- Contact:
I think the firing arc is hardcoded, and is somewhere in the neighbourhood of 120 degrees. Make sure that your turret is positioned and--more important--orientated correctly in the direction you wish your turret to fire into.
For me your problem sounds as if you haven't orientated your turret, but are using a backwards firing turret. If you mount that on the front side of your ship, you will get a result like you have.
For me your problem sounds as if you haven't orientated your turret, but are using a backwards firing turret. If you mount that on the front side of your ship, you will get a result like you have.
Oh I have orientated the turret all right. I just didn't think it would fire through the ship it belongs to.
The green turret works as intended, firing arc indicated by blue.
Purple one fires as indicated by red lines (& light red area), what I thought it would do is indicated with yellow lines (& light yellow area).
The green turret works as intended, firing arc indicated by blue.
Purple one fires as indicated by red lines (& light red area), what I thought it would do is indicated with yellow lines (& light yellow area).
...and keep it under lightspeed!
Friendliest Meteor Police that side of Riedquat
Far Arm ships
Z-ships
Baakili Far Trader
Tin of SPAM
Friendliest Meteor Police that side of Riedquat
Far Arm ships
Z-ships
Baakili Far Trader
Tin of SPAM
Nope.ClymAngus wrote:out of interest does your ship go BANG! when you try and refuel it?
Caduceus does (hacked a savegame to test it).
...and keep it under lightspeed!
Friendliest Meteor Police that side of Riedquat
Far Arm ships
Z-ships
Baakili Far Trader
Tin of SPAM
Friendliest Meteor Police that side of Riedquat
Far Arm ships
Z-ships
Baakili Far Trader
Tin of SPAM
- JensAyton
- Grand Admiral Emeritus
- Posts: 6657
- Joined: Sat Apr 02, 2005 2:43 pm
- Location: Sweden
- Contact:
I did the research on this, but forgot to answer. Oops!
The field of fire of a turret is a cone whose aperture is just over 156.926 °, centred on its original facing. (The angle is irrational because the actual definition in code is that the cosine of the half-aperture is 0.2; cos⁻¹ 0.2 ≈ 78.463 ° ≈ 1.3694 rad.) Currently no attempt is made to avoid firing through the ship. This will not be fixed for MNSR since our only ray-object collision testing code is based on octrees, which are not sufficiently fine-grained for this type of test.
For modelling purposes, a cone whose height is one tenth of its diameter has a slightly larger aperture (157.398 °) and makes a good stand-in. (A larger aperture is desirable because cones in 3D modellers are generally polygonal approximations inscribed in the cone rather than fully filling it out.)
The field of fire of a turret is a cone whose aperture is just over 156.926 °, centred on its original facing. (The angle is irrational because the actual definition in code is that the cosine of the half-aperture is 0.2; cos⁻¹ 0.2 ≈ 78.463 ° ≈ 1.3694 rad.) Currently no attempt is made to avoid firing through the ship. This will not be fixed for MNSR since our only ray-object collision testing code is based on octrees, which are not sufficiently fine-grained for this type of test.
For modelling purposes, a cone whose height is one tenth of its diameter has a slightly larger aperture (157.398 °) and makes a good stand-in. (A larger aperture is desirable because cones in 3D modellers are generally polygonal approximations inscribed in the cone rather than fully filling it out.)
E-mail: [email protected]
Hey, this is good to know!
Thanks!
Thanks!
...and keep it under lightspeed!
Friendliest Meteor Police that side of Riedquat
Far Arm ships
Z-ships
Baakili Far Trader
Tin of SPAM
Friendliest Meteor Police that side of Riedquat
Far Arm ships
Z-ships
Baakili Far Trader
Tin of SPAM