I'm using the LineOfSight behavior with a little top-down space adventure game. I want to use it along with a player-centered light and shadow-casting obstacle sprites to hide areas and objects that the player doesn't have a line-of-sight to.
It basically works, but I have two problems which I'd like to discuss:
1) Objects marked "Solid" never satisfy the "Has LOS to object" condition.
2) The "Has LOS to object" condition is only true when the player has direct line-of-sight to the center of the object.
Issue #1 can be worked around by using a secondary non-solid object at the same position as the solid object, which is then used to query visibility. Is there a better option, short of changing the behavior code?
Issue #2 seems to require a change to the behavior code to consider object width/height/radius. Or is there another option?