syrasia 17 Posted November 7, 2019 Hey, I found a new problem for me with lineIntersectsSurfaces! Here is a picture of the situation (uniform in GroundWeaponHolder): As you can see, stuff can be grabbed through the fence and the bigger problem for me is, I don't get the fence with my script: // kurze Funktion, um alle Validen Holder zu bekommen // alle WeaponHolder bekommen private _holderList = nearestObjects [player modelToWorld [0, 1, 0.8], ["GroundWeaponHolder"], 1.5]; // vorbereiten der "erlaubten" Holder private _validHolders = []; // alle Holder durchgehen { // da ARMA zu ungeau direkt am Boden oder auf anderen Objekten ist, zart anheben private _elevatedHolderPosASL = getPosASL _x vectorAdd [0, 0, 0.1]; // nun die Kollisionen mit falschen Objekten aufrufen. Wir sortiren die WeaponHolder direkt aus, da wir mehr als nur unser eigenes bekommen in machnchen Situationen private _intersections = (lineIntersectsSurfaces [eyePos player, _elevatedHolderPosASL, player, objNull, true, -1, "FIRE","GEOM"] select {typeOf (_x select 2) != "GroundWeaponHolder"}); // wenn wir nun bei null Kollisionen sind, haben wir was passendes if (count _intersections == 0) then { _validHolders pushBack _x; }; }forEach _holderList; _validHolders What about the other LOD's? Could they help? or how do I get the fence? And "GEOM" does not give the fence? Why to, passing through is not possible. Edit: I tried out with cursorObject and lineIntersectsObjs (with any logical flag), all don't give the fence...welp.😫 Share this post Link to post Share on other sites
pierremgi 4737 Posted November 7, 2019 You could save a lot of time, just moving a little bit away the uniform. Your fence is an object (cursorObject) at its base. Share this post Link to post Share on other sites
syrasia 17 Posted November 7, 2019 3 minutes ago, pierremgi said: You could save a lot of time, just moving a little bit away the uniform. Your fence is an object (cursorObject) at its base. Well if I move the WeaponHolder away, the player can't reach it through the fence at all, as it is to far away anyway, so that is not the idea (I placed it as player there, testing spots and potential mistakes). So if I can't get the fence in this condition, then it will just exist in the game and I have to accept it. Share this post Link to post Share on other sites
killzone_kid 1326 Posted November 7, 2019 Must be doing something wrong, lineIntersectsSurfaces detects wire fences just fine, Example 3 shows how. Share this post Link to post Share on other sites
syrasia 17 Posted November 7, 2019 3 hours ago, killzone_kid said: Must be doing something wrong, lineIntersectsSurfaces detects wire fences just fine, Example 3 shows how. Okay, will do some more test (maybe the path I am testing is bad?). But in the example the fence is created. Does the fence being a map object have anything to do? Share this post Link to post Share on other sites
Dedmen 2588 Posted November 8, 2019 Try using DrawLine3D to draw the path that youre checking and make sure its correct. 1 Share this post Link to post Share on other sites
syrasia 17 Posted November 8, 2019 Alright, with DrawLine3D I could confirm: the path intersects with the fence, clearly. Here is some proof: Here I still get no fence and therefore the WeaponHolder on the other side is "valid". Here with my menu, as you can see, right side on the ground should give a "fence" as a path blocker. But I will do one more quick test (in the wiki example they use -only- "GEOM", could that be it?). Edit: alright, somehow my assumption was correct! Now I do get the fence, but if I use "GEOM" only (or as first at least). With LOD's "GEOM", "NONE" the fence gets reported, will try to play a bit more with that, but isn't that a bug of arma then? Shouldn't it always get me the fence as long I use "GEOM"? Share this post Link to post Share on other sites
syrasia 17 Posted November 8, 2019 Okay, done some more testing. Found out the order of LOD's does matter, can't tell why tho. Should that be? My testing code: diag_log lineIntersectsSurfaces [eyePos player, _elevatedHolderPosASL, player, objNull, true, -1, "VIEW","GEOM"]; diag_log lineIntersectsSurfaces [eyePos player, _elevatedHolderPosASL, player, objNull, true, -1, "GEOM","VIEW"]; As you can see, only swapped the order of the LOD's, everything else is the same! And the result in the rtp: 14:20:46 [[[7869.65,7719.93,6.83366],[0.0159965,0.0133305,0.999783],1abc428a080# 1675126: dummyweapon.p3d,1abc428a080# 1675126: dummyweapon.p3d]] 14:20:46 [[[7869.63,7719.9,6.69008],[0.0159965,0.0133305,0.999783],1abc428a080# 1675126: dummyweapon.p3d,1abc428a080# 1675126: dummyweapon.p3d]] 14:20:52 [[[7869.19,7720.29,6.80762],[-0.802061,0.0193469,0.596928],1abe6e62080# 1675130: dummyweapon.p3d,1abe6e62080# 1675130: dummyweapon.p3d]] 14:20:52 [[[7869,7720.26,7.05192],[-0.998523,-0.0543288,-1.53104e-006],293046: netfence_01_m_4m_f.p3d,293046: netfence_01_m_4m_f.p3d],[[7869.39,7720.33,6.56036],[-0.00889149,-0.954604,0.297744],1abe6e62080# 1675130: dummyweapon.p3d,1abe6e62080# 1675130: dummyweapon.p3d]] 14:20:52 [[[7868.47,7720.31,6.84742],[0.0159965,0.0133305,0.999783],1abf089eb00# 1675139: dummyweapon.p3d,1abf089eb00# 1675139: dummyweapon.p3d]] 14:20:52 [[[7868.44,7720.33,6.70336],[0.0159965,0.0133305,0.999783],1abf089eb00# 1675139: dummyweapon.p3d,1abf089eb00# 1675139: dummyweapon.p3d]] 14:20:57 [[[7869.2,7720.31,6.80968],[-0.802061,0.0193469,0.596928],1abe6e62080# 1675130: dummyweapon.p3d,1abe6e62080# 1675130: dummyweapon.p3d]] 14:20:57 [[[7869,7720.28,7.06101],[-0.998523,-0.0543288,-1.53104e-006],293046: netfence_01_m_4m_f.p3d,293046: netfence_01_m_4m_f.p3d],[[7869.38,7720.33,6.57217],[-0.00889149,-0.954604,0.297744],1abe6e62080# 1675130: dummyweapon.p3d,1abe6e62080# 1675130: dummyweapon.p3d]] 14:20:57 [[[7868.47,7720.33,6.84715],[0.0159965,0.0133305,0.999783],1ab8cc85600# 1675146: dummyweapon.p3d,1ab8cc85600# 1675146: dummyweapon.p3d]] 14:20:57 [[[7868.44,7720.35,6.70312],[0.0159965,0.0133305,0.999783],1ab8cc85600# 1675146: dummyweapon.p3d,1ab8cc85600# 1675146: dummyweapon.p3d]] 14:21:06 [[[7869.14,7720.31,6.73167],[-0.802061,0.0193469,0.596928],1abe6e62080# 1675130: dummyweapon.p3d,1abe6e62080# 1675130: dummyweapon.p3d]] 14:21:06 [[[7869,7720.29,6.85207],[-0.998523,-0.0543288,-1.53104e-006],293046: netfence_01_m_4m_f.p3d,293046: netfence_01_m_4m_f.p3d],[[7869.33,7720.33,6.56082],[-0.00889149,-0.954604,0.297744],1abe6e62080# 1675130: dummyweapon.p3d,1abe6e62080# 1675130: dummyweapon.p3d]] 2 outputs (with the same timestamp) do always belong together, first being "FIRE" "GEOM" and second "GEOM" "VIEW". Only, and really only in the "GEOM" "VIEW", do get me the fence if it was in the way. For a little clarification: ARMA generates a WeaponHolder on its own, when you open inventory, therefore I have some more (as can be seen through the ID'S). They can be Ignored, as the are right at player position. This problem is solved for me, but if someone can explain, why I got this weird behavior, I would appreciate it. 2 Share this post Link to post Share on other sites
madrussian 347 Posted November 8, 2019 I think I maybe experienced exactly what you are talking about (after quick skim of thread). Here goes: A while ago with lineIntersectsSurfaces, I noticed using specific combinations of "FIRE", "VIEW", and/or "GEOM" in a single lineIntersectsSurfaces command, gives a very different set of intersect points than calling lineIntersectsSurfaces multiple times with the exact same set of "FIRE", "VIEW", and/or "GEOM" individually. In other words, contrary to intuition: _allIntersections = lineIntersectsSurfaces [_posASL1, _posASL2, objNull, objNull, true, -1, "VIEW", "GEOM"]; is absolutely not equal to: _intersections1 = lineIntersectsSurfaces [_posASL1, _posASL2, objNull, objNull, true, -1, "VIEW"]; _intersections1 = lineIntersectsSurfaces [_posASL1, _posASL2, objNull, objNull, true, -1, "GEOM"]; _allIntersections = _intersections1 + _intersections2; ^ Btw - These are not just unequal order-wise... you don't even get the same set of points back. In my building scanner for instance, for almost all buildings I can use VIEW + GEOM together in one lineIntersectsSurfaces command, and the floor detects just fine. But in certain buildings like "Land_Helfenburk", I have to use VIEW alone in one lineIntersectsSurfaces command, followed by GEOM alone in another lineIntersectsSurfaces command. (... Or else it fails to detect the floor) Hope that helps. 4 Share this post Link to post Share on other sites
johnnyboy 3741 Posted November 8, 2019 1 hour ago, syrasia said: 2 outputs (with the same timestamp) do always belong together, first being "FIRE" "GEOM" and second "GEOM" "VIEW". Only, and really only in the "GEOM" "VIEW", do get me the fence if it was in the way 22 minutes ago, madrussian said: A while ago with lineIntersectsSurfaces, I noticed using specific combinations of "FIRE", "VIEW", and/or "GEOM" in a single lineIntersectsSurfaces command, gives a very different set of intersect points than calling lineIntersectsSurfaces multiple times with the exact same set of "FIRE", "VIEW", and/or "GEOM" individually. Hey guys, thanks for clearly documenting this confusion here in the forums. This will definitely save some people's time and frustration. Good work.👍 3 Share this post Link to post Share on other sites