Jump to content
Devastator_cm

determine if object is beneath another

Recommended Posts

 Hi Guys,

is there any BIS function (I couldn"t actually find one..) which tells if an object is beneath another one?

Share this post


Link to post
Share on other sites

Are you sure on that?
"Returns list of objects intersected by given line from begPos to endPos."

 

Even if the objects are next to each other it will still return intersection or? I just need to capture if they are above each other

Share this post


Link to post
Share on other sites
		(getPosASL obj1) params ["_vx","_vy","_vz"];
		if !(count (lineIntersectsObjs [getPosASL obj1, [_vx,_vy,(_vz + 20)]]) == 0) exitWith {hint "Something above obj1"};

 

Share this post


Link to post
Share on other sites

via small correction it did the trick

if (count (lineIntersectsObjs [getPosASL quad, [_vx,_vy,(_vz + 20)]]) > 1) then {hint "Something above obj1"};

 

thanks

 

Share this post


Link to post
Share on other sites

Is this command not working underwater properly? 

Looks like lineIntersectsSurfaces  works better

Edited by Devastator_cm
lineIntersectsSurfaces

Share this post


Link to post
Share on other sites

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now

×