OFPEC Forum

Addons & Mods Depot => ArmA - Configs & Scripting => Topic started by: Spooner on 16 Aug 2008, 17:53:15

Title: Use of the intersect command for vehicles
Post by: Spooner on 16 Aug 2008, 17:53:15
I've been using intersect (http://www.ofpec.com/COMREF/index.php?action=list&game=All&letter=i#595) to great effect on infantry, but on vehicles, it seems to only give a positive result for some parts of the model. For example, it will only work when the line passes through the wheels of a car or bike, or when it passes through the turret of a tank. This leads me to wonder whether it is only giving positive intersections on the first selection (I don't know anything about models or the applications for examining them, so I can't check this). Either I need it to intersect with any selection (I don't care, which, I actually just need to know if I've intersected with the model as a whole), or with a specific selection.

According to the BIKI (http://community.bistudio.com/wiki/intersect), it says "FIRE", "VIEW", "GEOM" and "IFIRE" are appropriate LODs that can be interesected with, and, as I said, this works fine for infantry. I tried things like "FIRE2", "FIRE B", "FIRE 2", etc., to no avail, but I'm groping around in the dark, so I wasn't too hopeful ;P

Hopefully, someone with more knowledge of how selections and LODs work might be able to give me some ideas...
Title: Re: Use of the intersect command for vehicles
Post by: Planck on 16 Aug 2008, 18:49:43
Well "FIRE", "VIEW", "GEOM", "IFIRE" are the LOD references I suppose:

Fire Geometry LOD
View Geometry LOD
Geometry LOD
Haven't got a clue for "IFIRE"

Only suggestion I can see to find the named selections is to load an mlod version of the model into O2 and check the specific LOD and its named selections which will be listed.


Planck
Title: Re: Use of the intersect command for vehicles
Post by: Spooner on 19 Aug 2008, 16:49:13
Writing some more tests for this, I realise that the array it returns is actually terribly useful (oops, I'd just been using it as a boolean!). The results from testing this command show a number of interesting facts:
  * All selections on a soldier are intersectable.
  * A soldier's gun is in the selection "right foot"!
  * Vehicles have multiple, but not all, selections available for intersection.
  * Static and Thing don't seem to have any selections available for intersection.

This begs the question of whether the the p3ds are wrong, whether the config is wrong or whether intersect is broken.

I've put my LOS function (http://www.ofpec.com/forum/index.php?topic=32025.0) up at the beta testing, since I think it might be useful for other people to play with.
Title: Re: Use of the intersect command for vehicles
Post by: Mr.Peanut on 21 Aug 2008, 17:13:23
Spooner,

Reading through this thread (http://www.ofpec.com/forum/index.php?topic=29174.0) might be helpful.
My own question is do static map objects return a LOD via the intersect command?
Title: Re: Use of the intersect command for vehicles
Post by: Spooner on 29 Aug 2008, 20:03:48
I downloaded Oxygen 2 and looked at a few of the sample BIS models in the various LODs. It seems that the selections that are found by "FIRE" intersect are all selections with specific names given to them (I'm sure I read some mention of "named selections" being special in some way, but I don't make a great effort to remember too much about anything except scripts and config). The LOD selections that don't have specific names are just shown in Oxygen as "component01", "component02", etc. Can't understand why intersect doesn't give those selections, even if it just gives an arbitrary name for them. Still non-plussed, but perhaps if someone fixed all the names, we might get somewhere (I'm not expecting this to happen, sadly).