playMaker

Author Topic: How to limit player vision in an isometric 2D game?  (Read 1232 times)

Migsterium

  • Playmaker Newbie
  • *
  • Posts: 6
How to limit player vision in an isometric 2D game?
« on: October 12, 2020, 03:02:57 PM »
Hi there! I'm working on a demo for an adventure horror game where you explore a cursed Aztec temple and I'd like to add a cone-of-vision gameplay mechanic. Basically, I want to have a clear visual representation of the player's field of vision and I need for my game objects (mainly enemies and important items) outside the field of vision to disappear from the game world when the player is NOT looking at them.

Can anyone help me achieve this using Playmaker?

I've attached a screenshot from the game Darkwood to help illustrate what I'm trying to accomplish.

djaydino

  • Administrator
  • Hero Member
  • *****
  • Posts: 7616
    • jinxtergames
Re: How to limit player vision in an isometric 2D game?
« Reply #1 on: October 12, 2020, 04:46:43 PM »
Hi.

If 2D you can use Sprite mask component.

If 3D you need to look into shaders.


Migsterium

  • Playmaker Newbie
  • *
  • Posts: 6
Re: How to limit player vision in an isometric 2D game?
« Reply #2 on: October 12, 2020, 04:50:02 PM »
Hi.

If 2D you can use Sprite mask component.

If 3D you need to look into shaders.

I'm sorry, but could you elaborate? I'm not sure how that works. It's the first time I'm using this tool.

djaydino

  • Administrator
  • Hero Member
  • *****
  • Posts: 7616
    • jinxtergames
« Last Edit: October 12, 2020, 05:04:12 PM by djaydino »