How do I make LOS-obstructing objects visible to LOS?

0 favourites
  • 4 posts
From the Asset Store
Welcome! I-Spy (Hidden objects) is an educational puzzle that is more than just seek-and-find activities.
  • Hello all!

    I seem to have run into a wall with the Line-of-Sight behavior.

    It seems that any objects that obstruct line of sight also obstruct themselves. This means that any objects such as walls or trees that might be used to hide objects behind them are themselves invisible to the LOS behavior.

    Is there any way around this little problem or alternative solutions/plugins that others have had success with?

    If this is just a limitation of Construct's line of sight behavior, it's a damn pity as it greatly limits the behavior's potential.

    Thanks very much in advance.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • You can add a separate distance and angle comparison check to bypass those restrictions.

  • You can add a separate distance and angle comparison check to bypass those restrictions.

    Thanks for the reply!

    Do you mean a separate check to see if the object is in range and should be visible that bypasses Construct's Line of Sight check? How would I prevent this angle and distance check from returning objects that should be obstructed by obstacles?

    The only solution I could think of was to do away with Construct's LOS system all together and use a series of of "for" loops to check for any obstacles in a ring around the player, but I was hoping there was a better way.

  • The way you describe it, walls or doors that obstruct other sprites that LoS is checking for, ie. Monster or Loot.

    So have the normal LOS for Monster/Loot.

    Have separate distance/angle check for Walls or Doors.

    Does that make sense?

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