OFPEC Forum

Editors Depot - Mission Editing and Scripting => ArmA - Editing/Scripting General => Topic started by: Mandoble on 20 Jun 2007, 18:47:28

Title: Laser designator curiosity
Post by: Mandoble on 20 Jun 2007, 18:47:28
For those of you playing with it, the laser target (mark in the target) is not affected by water. So, if you target a ship, what you are in fact targeting is a point in the bottom of the sea hundreds of meters away of that ship and in the opposite side than you (the illuminator). This applies, at least, to 1.08 and current OPFOR side boats.
Title: Re: Laser designator curiosity
Post by: Cheetah on 20 Jun 2007, 19:21:11
Hmm. The laser designator only works when targeting land? Thought that it worked too while pointing at objects?
Title: Re: Laser designator curiosity
Post by: Mandoble on 20 Jun 2007, 20:00:55
It works also targeting vehicles, but does not work with current east side ships. The laser bean ignores the ship and gets into the sea till it hits the bottom.
Title: Re: Laser designator curiosity
Post by: Mr.Peanut on 20 Jun 2007, 20:58:20
So you can not see the LD glow marker at all?
Title: Re: Laser designator curiosity
Post by: Mandoble on 20 Jun 2007, 21:46:46
Well, I see the glow but then I get the laserTargetW object and get its pos and Z is well below -30m.
Title: Re: Laser designator curiosity
Post by: Mr.Peanut on 21 Jun 2007, 03:12:52
Well, in hindsight I'd say it is an engine limitation. Boats are a bit like aircraft, they are usually not at z=0 in world coordinates.  What does getPosASL return? I have always found the vertical coordinate system in OFP/ArmA a bit strange.  Although it is often convenient to refer to ground level as zero for land vehicles, for anything else it is a royal pain in the behind. Perhaps there is some way to capture the glow object itself and get its position?
Title: Re: Laser designator curiosity
Post by: Cheetah on 21 Jun 2007, 09:37:49
Isn't there an intersect option, might be used to detect if an object is on the line the weapon is pointing at / player is looking at. But this could be an engine limitated. I guess we have to create another work arounds, which is probably the most time consuming part of mission editing, work arounds ;).
Title: Re: Laser designator curiosity
Post by: Mandoble on 21 Jun 2007, 11:14:53
Well, with the weapon direction and the height (below sea) of the object, the point where it intersected the water surface is easy to calculate, but again, any laser bomb equipped unit will target the laserTarget object, which is far away and near the sea bottom.
Title: Re: Laser designator curiosity
Post by: Mr.Peanut on 21 Jun 2007, 17:20:39
Alternative better idea: If the glow object can be captured with nearestObject
1) Fired event handler starts script
2) Script captures correct glow object
3) Script starts fast loop
4) If glow object is over water then setPos LD target to glow object position
5) If glow object is objNull then exit script

Questions:
1) Is the laser target a vehicle class? Otherwise setPos will be local.
2) Does the fired event handler work with the LD?
Title: Re: Laser designator curiosity
Post by: Planck on 21 Jun 2007, 18:29:21
From the comref:

Code: [Select]
LaserTarget Class:

class All
  class LaserTarget
    class LaserTargetBase
      class LaserTargetCBase
        class LaserTargetC
      class LaserTargetWBase
        class LaserTargetW
      class LaserTargetEBase
        class LaserTargetE
  class FireSectorTarget
 

So, yes, under cfgVehicles.


Planck
Title: Re: Laser designator curiosity
Post by: Mandoble on 21 Jun 2007, 18:38:27
And here comes something funny too.
LaserTargets are "enemy" sided.

For example a BLUFOR recon unit activates its target, the laser target object is of type laserTargetW and its side is EAST. If you provide a laser designator to an OPFOR unit, the target object type would be laserTargetE and its side is WEST.

BUT

If you provide a laser designator to an Independent or civilian unit, the laser object type would be laserTargetC and its side is CIV.

So, any RES (Independent) unit (or civilia) with laser guided bombs or laser guided missiles would not engange any laserTarget illuminated by friendly forces, because the target object itself is friendly :blink:
Even more, Independent units friendly to BLUFOR illuminating targets would have the same result, the target is CIV so BLUFOR AV8Bs would not engange.
Title: Re: Laser designator curiosity
Post by: Mr.Peanut on 21 Jun 2007, 18:52:32
Why would they require a parent class for a single parent-child pair?

Edit: don't see any comref entry for glow objects.

Edit2: As for the strange side behaviour, I guess it makes sense for the west target to be an east vehicle and vice versa.

Edit3: @Mandoble - What object were you trying to target? I tried and the position was reported properly as long as the glow was actually seen hitting the boat.  The problem is not all surfaces of the boat properly intersect the glow. It seems like parts of the model that are perfectly vertical do. As far as I can tell the glow is the LaserMarker object and its position can not be altered with setPos , nor can it be deleted with deleteVehicle.  The lase designator does not work with the fired event handler.
Title: Re: Laser designator curiosity
Post by: Mandoble on 01 Jul 2007, 15:50:13
And another weird thing, if you create laser targets with createVehicle, ArmA will remove them automatically after few seconds.