Right now we have great Intersect commands that are really usefull for a lot of neat things, but they have some limitations:
1- It always uses the same LOD for the test, so for example it will ignore fences or windows.
2- There is no direct way to get de exact point where the line intersects the object. You can workaround that by creating a loop with various checks that could get a really precise intersect point, but it isn't that efficient.
3- There is no way to know the surface normal on the intersection point. That could be used for things like attaching objects correctly or if you want to do some deflection calculation.Again you can workaround this by some kind of virtual shot, or an elavorate loop to kindda get the normal... but in this case it would be awfully inefficient
To solve this, it would be great to have a new lineIntersect command that have some extra features for example:
lineIntersectsAdvanced [begPos, endPos, objectFlags, [ignoredObjectsArray],usedLOD]
Params:
begPos: initial position.
endPos: end position.
ObjectFlags: Some kind of flags that lets you choose the type of objects you want to test. Something similar to the flags in lineIntersectsObjs could be enough.
ignoredObjectsArray: array of objects to ignore when doing the calculations
usedLOD: LOD to take on account when doing the calculations. Could be: "Geometry", "FireLOD", "ViewLOD, "roadway"
Return value:
Array with this info for each intersected object:
[
Object or objects found( using objectFlags),
Intersection point,
surface normal on that point
]