Line of Sight weird behavior

This forum is currently in read-only mode.
From the Asset Store
solution for games like "fruit ninja" and drawing applications
  • I don't quite understand how line of sight works. For example, I have a solid player sprite and a fixed line of sight object sprite. If I set the line of sight obstacles to custom then it correctly finds the player. However, if I set it to "solid" then it ignores the player. Seems like there should be an exception for the player no matter if its solid or not.

    What I ended up having to do is set the obstacles to custom and then define the walls to be the obstacles in any actions. This doesn't make sense to me though. Is this a bug or the way its supposed to work?

  • Posting a .cap might help (it's always a good idea IMHO). I think the issue is that you're getting confused with the 'custom' setting - it means you use an action to add the object types that cannot be seen through.

  • Try Construct 3

    Develop games in your browser. Powerful, performant & highly capable.

    Try Now Construct 3 users don't see these ads
  • http://dl.getdropbox.com/u/888303/Caps/detecting.cap

    This is what he means, the Line of Sight plugin detects only hotspot of sprite so if he's solid it will simply not see the sprite.

  • Thanks Doppel!! Yes, that was what I meant. I didn't know about line of sight plugin using the hotspot for detection.

    Off the top of my head, I can't think of a case where the player sprite would not be solid. It seems like it would be nice to just use the default "solid" option in the line of sprite behavior (like the example Doppel showed). That way you don't have to go adding obstacles. Another option would be to add an action to "remove obstacle". The only current actions are "add obstacle" and "remove all obstacles". That way you could keep the player sprite solid (with the hotpot in the center) and then just select the player as an obstacle to remove.

  • Thanks Doppel!! Yes, that was what I meant. I didn't know about line of sight plugin using the hotspot for detection.

    Yeah still weird that it wont exlude the target as not-obstacle.

    Bug posted in sourceforge

    http://sourceforge.net/tracker/?func=de ... id=1003219

Jump to:
Active Users
There are 1 visitors browsing this topic (0 users and 1 guests)