Hopefully the title is self-explanatory but some more details:

  • game is in isometric perspective with the camera locked to the player but from a significant distance away, creating high likelihood of obstructions by the level and decorations occuring
  • I want the player to see their character’s vision and not have these obstructions block the player’s view.

One way to achieve this might be to use raycasts from the character to hide objects (like walls or buildings) if they collide with an object on the opposite side to the camera. A slight problem there is if buildings have interiors then the rays wouldn’t necessarily hit all relevant objects. Sometimes both the interior and exterior of the building would need to visible.

I’ve seen a few videos on stencil buffers but my understanding is that this might not apply, but I will admit to not understanding them well. Any help appreciated for this newbie to game dev.

  • Takapapatapaka@tarte.nuage-libre.fr
    link
    fedilink
    English
    arrow-up
    0
    ·
    7 days ago

    Oh, yes quite smart and maybe also computing the distance between the player and the object, to avoid making transparent objects that are in player’s sight but very far away