Page MenuHomeFeedback Tracker

lineIntersectsSurfaces ignores ignoreObj Parameter if inside a vehicle
Acknowledged, NormalPublic


lineIntersectsSurfaces ignores it's ignoreObj parameter if the object is inside a vehicle...

lineIntersectsSurfaces [
    eyepos unit2,
    eyepos unit1,

I'm doing lineIntersectsSurfaces between a unit in a vehicle and an outsider... Not only is it ignoring it's ignoreObj parameter.. But also It's returning a intersection for the weapon of the unit inside the vehicle
I have unit1 inside the vehice and unit2 right beside it.
the ignoreObj parameters on lineIntersectsSurfaces are unit1 and unit2
If unit1 is in the vehicle the ignoreObj parameter for him gets ignored and lineIntersectsSurfaces returns unit1 and the vehicle.

Vehicle in question is the AMV-7 Marshall and unit1 is in the commander seat.
Also if he is in vehicle lineIntersectsSurfaces takes 0.08ms instead of 0.04 if he is outside.
Even if keeping the points of the line the same instead of dynamically using eyePos (which also takes over 2x the time to execute if he is in a vehicle) the same performance degredation happens just by one of the ignoreObj's being inside a vehicle... To be exact it only happens when unit1 (the server host) is inside the vehicle... If i swap and unit1 stands outside with unit2 inside it works fine...

Will investigate more tomorrow.


Operating System
Windows 8 x64

Event Timeline

dedmen created this task.Jan 19 2017, 2:40 AM
Alwin changed the task status from New to Acknowledged.Jan 24 2017, 4:00 PM
This comment was removed by razazel.
BIS_fnc_KK added a subscriber: BIS_fnc_KK.EditedJan 27 2017, 10:36 AM

Works fine for me. Are you sure that what you think is your unit is not a vehicle? Also there is no unit inside the vehicle, I hope you realise that, there is proxy of the unit. And as proxy it is returned accordingly with vehicle being its parent.

Do what razazel said, name all units and vehicles in editor so you can clearly see what object is returned and there is no confusion

dedmen added a comment.EditedJan 27 2017, 10:50 AM

The returned Array had 2 sometimes 3 results
One was the Unit inside the Vehicle (unit1 isEqualTo <first returned entity>) second one was the vehicle ( (vehicle unit1) isEqualTo <second returned entity>) )
third one was sometimes the weapon of the Unit inside the Vehicle. Which seems weird but somewhat correct.
I was expecting the Vehicle to be detected.. So i subtracted One from the count of interceptions. But I still had >0 Interceptions which i didn't expect. Thats how i found this out. I'm gonna make a repro Mission right now.

dedmen added a comment.EditedJan 27 2017, 10:59 AM

Mission File

Return of the code in my First post is


As you can see its returning unit1 although unit1 and unit2 are ignored.

If I remove the ignore of unit2 i get


as expected. Putting only unit2 as ignore i get:


Same result as if i had unit 1 in ignore.
If i put unit1 into both ignore1 and ignore2 i get this:


Having vehicle1 in the ignore list seems to do the trick

BIS_fnc_KK added a comment.EditedJan 27 2017, 11:11 AM

Mission File

Return of the code in my First post is


Quote from command documentation:

intersectObject - the object the surface belongs to (could be proxy object)
parentObject - the object proxy object belongs to (not always the same as intersect object)

unit1 is clearly a proxy in a vehicle. And weapon you can sometimes pick up is a unit proxy. What you need is not trying to ignore a proxy by putting object in ignore, but change the LOD from FIRE to something else. both GEOM and VIEW work fine for me.

Anyway, there is nothing wrong with the command, it works as intended. It uses engine method for intersection just like the rest of the Arma engine. I highly doubt there is a problem with it.

dedmen added a comment.EditedJan 27 2017, 11:23 AM

So it is intended that objects in the ignoreObj paramter may still be returned although the developer wants them to be ignored?
GEOM and VIEW don't work for me. It may work for the Vehicle but it doesn't return the house if there is a window between unit1 and unit2.

I am using the Intersections for Voice volume calculations. The Problems were that turned Out players were still intersecting with the vehicle which i could easily fix. But then it not only intersected with the Vehicle but also with the turnedOut unit itself.

Because GEOM and VIEW don't return anything if there is a window between both Units I can't use that. Because unit1 may be behind a window inside a vehicle turning out.

So final solution would be to iterate over the output array and make sure that the Objects i specified to be ignored are really ignored?

It just really sounds like a Bug to me that a object that i specified to be ignored is not ignored and still returned.
Also the wiki page doesn't say anything about that proxy objects would be ignored by the ignoreObj parameter.

BIS_fnc_KK added a comment.EditedJan 27 2017, 12:09 PM

Once again unit in vehicle is not the same unit when outside of the vehicle, it is a proxy. eyePos of the unit in driver seat of Marshall is above the armour for example, not inside vehicle as you would expect. I think you are for a lot of surprises with this approach.

So final solution would be to iterate over the output array and make sure that the Objects i specified to be ignored are really ignored?

You can always switch LOD when in vehicle and when not