• Hey! Guest! The 39th GMC Jam will take place between November 26th, 12:00 UTC and November 30th, 12:00 UTC. Why not join in! Click here to find out more!

vision cone

  1. Divinik

    Shaders Only Draw Unobstructed Part Of Sprite?

    I have a vision cone sprite that enemies use to signify their field of view. I'm trying to figure out how to make it so that when a part of the sprite is overlapping with another sprite, that part is not drawn. Basically like a spotlight, where the light would stop where a solid object is. Any...
  2. X

    Legacy GM [SOLVED] Alarm toggling

    I'm making a security camera that pans back and forth on a series of alarms and rotates a triangle for use as a "vision-cone". I'm also letting the player take control of the camera by pressing 'C' and then manually rotating it with the arrow keys. 'C' toggles the state of the "camCon" variable...
  3. S

    Windows Make an object create an object and follow it

    I am trying to implement a vision mechanic in my game (not using distance_to_object) by using an object with the sprite of a vision cone. This is the current code for creating the cones at the start of the game. //Check if we have vision HaveVision = instance_place(x,y,oVision) if...
  4. K

    Enemy Line of Sight Issue

    I'm having trouble with Enemy lines of sight. Right now I'm using an object (obj_enemyVision) as a sight cone being drawn on to an enemy. This works as it faces the correct direction and all, but I don't want them to be able to see through walls. Is there a better way to do this? Thanks.
  5. B

    Legacy GM Vision Cone Problem

    Hello, right now i'm making a ray casting game (the illusion of 3D) but I've run into a problem and i'm not able to do myself. Basically, (This is all in the 2D room) I've got my 90 degree vision cone coming out like a triangle from my player. I've done this by drawing 3 lines. Then I send a...