Jump to content
🛡️FORUMS ARE IN READ-ONLY MODE Read more... ×
Alert23

lineIntersects (broken)?

Recommended Posts

hi, i cant get lineIntersects command to work properly i always get this result, why?

76JEv2J6.png

Share this post


Link to post
Share on other sites

Perhaps because there is nothing for intersection between player's eyes and target1's eyes. Who knows? 🙄

  • Thanks 1

Share this post


Link to post
Share on other sites
5 minutes ago, pierremgi said:

Perhaps because there is nothing for intersection between player's eyes and target1's eyes. Who knows? 🙄

LOL, i thought i can check this way if player sees target1?

edit:

silly me, now i understand this command 😅

Edited by Alert23

Share this post


Link to post
Share on other sites

You should use aimedAtTarget (unit) or, if it's just for direction,something like:

 

eyeDirection player vectorCos (getPosASL target1 vectorDiff eyepos player) > 0.999 // empiric, need to be tuned

but that worth for direction, indep. of elevation

Keep lineIntersect or lineIntersectSurfaces for objects hiding the target.

 

 

  • Like 2

Share this post


Link to post
Share on other sites

×