Line of Sight & Marker Invisible Objects

Post » Wed Sep 14, 2016 8:30 am

So I'm performing LOS checks on XMarkerHeading objects and things are mostly working perfectly. One small quirk is that the LOS check only seems to consider the origin coordinates (the base in this case) so if the base is obscured by a boulder or something HasLOS() will return false even when the remainder of the marker is clearly visible.


Is there any lightweight object I can use which will consider the entire shape when performing LOS checks? Worst case scenario I use an invisible actor but since I need more than one of these and they will be persistent I would like to use the cheapest possible object.


Any recommendations are very much appreciated.

User avatar
Tracey Duncan
 
Posts: 3299
Joined: Wed Apr 18, 2007 9:32 am

Post » Wed Sep 14, 2016 9:01 pm

The least resource intensive actor I have found is a fish. (least AI, polygons, animations... eccetera.)



All my mods that use LOS checks have an actor I call "Little Dead Fish".



Even DEAD and DISABLED it will run LOS checks.



I have been doing this since Oblivion in many of my mods.



Edit: oh there is one big Gotcha you should be aware of... Moveto will not work once the actor is in the cell with the player or adjacent.


so always couple it with a set position function. Using Moveto and set position after solve the issue.



Funny I do not remember that being a problem in Oblivion (at least for actors, objects did have move to issues). I miss Oblivion modding, so much easier and less was hard coded and the oblivion script extender was more powerful...

User avatar
Crystal Clear
 
Posts: 3552
Joined: Wed Aug 09, 2006 4:42 am

Post » Wed Sep 14, 2016 6:30 pm

Oh I thought for sure that Disabled would automatically return False for LOS (similar to how the wiki says that LOS checks for objects behind the FOV are trivially determined), nice!!!



Thanks for the suggestion, that gotcha is a doozy though :P I don't think I would have ever been able to debug that.



Maybe I can use a disabled BlackPlane01, in theory it should be a single polygon. I'll have to open one up in nifskope. :tops:

User avatar
Roddy
 
Posts: 3564
Joined: Fri Jun 15, 2007 11:50 pm

Post » Wed Sep 14, 2016 9:18 pm



I prefer actors because objects cannot get line-of-sight to a non-actor.



But if you do not need that then I guess an object would be better.

User avatar
Taylor Tifany
 
Posts: 3555
Joined: Sun Jun 25, 2006 7:22 am

Post » Wed Sep 14, 2016 8:17 am

It's for the player :)


The good news is that BlackPlane01 is looking very ideal (with some small modifications :P). About to test it in-game right now.



Edit: Same problem with BlackPlane01 :( . Perhaps it is something specific to markers? I may have to use an actor.

User avatar
ZANEY82
 
Posts: 3314
Joined: Mon Dec 18, 2006 3:10 am

Post » Wed Sep 14, 2016 9:17 pm

So you are trying to get LOS to the player OR from the player to the object? It makes a big difference!



You do know that from the player to the object or actor it will return false if the camera cannot see the object. Even if there are line-of-sights (top middle bottom) outside the camera's view.



But yeah I find my "little dead fish" is more reliable unless all I want is a simple (like a wall) check from the player to the object right in front of the player (in the camera view).

User avatar
Skrapp Stephens
 
Posts: 3350
Joined: Mon Aug 06, 2007 5:04 am

Post » Wed Sep 14, 2016 2:32 pm

Player to object, I know that only the player can check LOS on non-actor refs. (And non-player actors can only use a detection check)


The camera view is what I see on screen isn't it? When my character is facing forward but my camera is looking behind at the marker my LOS checks return true.

User avatar
jessica Villacis
 
Posts: 3385
Joined: Tue Jan 23, 2007 2:03 pm


Return to V - Skyrim