Page MenuHomeFeedback Tracker

[Feature Request] New command for doing multiple line intersections at once: linesIntersectSurfaces
New, NormalPublic

Description

There are times where you want to check multiple intersections at once. There are several problems with the current lineIntersectsSurfaces command:

  1. Every new instance of the command has to search the game's quad tree for objects. It can be done only once.
  2. The command parameters are so limited. Sometimes you want intersections with a certain object(s) only. But having to search the quad tree for irrelevant objects is a huge waste of performance.
  3. Doing multiple intersections at once has the potential for multithreading, which may give a huge performance boost.

Which is why a new, more flexible command is now requested: linesItersectSurfaces

linesIntersectSurfaces [
  [ //array of point pairs, which are the intersection lines
    [p1, p2],
    [p3, p4],
    ...
  ],
  [],               //array of objects (either to ignore or include, depending on the mode; see below)
  [],               //array of types (e.g. "MAN", "B_soldier_F", etc.) (either to ignore or include, depending on the mode; see below)
  true,           //intersect mode: true: only intersection with above types/objects; false: ignore those types/objects; default is false
  true,           //sort mode; default is true
  1,               //number of intersections per line; default is 1
  ["GEOM"],  //array of LODs; if not possible, two lods like lineIntersectsSurfaces; default is ["VIEW", "FIRE"];
  false          // only unique results per line; default is true
]

returns an array of array of intersection results:

[
  [ [interPos, interNormal, interObj, interParent], ...], //[p1, p2],
  [ [interPos, interNormal, interObj, interParent], ...], //[p3, p4],
  ...
]

Details

Severity
Feature
Resolution
Open
Reproducibility
N/A
Operating System
Windows 10 x64
Category
Scripting

Event Timeline

Leopard20 updated the task description. (Show Details)Aug 22 2021, 6:34 PM
Leopard20 updated the task description. (Show Details)Aug 22 2021, 6:37 PM
h- added a subscriber: h-.Aug 23 2021, 7:10 AM