Michael McMullen
Member
GM Version: Gamemaker Studio 2
Target Platform: N/A
Download: N/A
Links: N/A
Summary:
Using a combination of lengthdir_x/y we can have any object shoot a ray out of their position and check to see what is in front of them, or beside them. We can transform this into a field of view and determine if we find a player object, or solid wall.
You can use this strategy to create walls that an enemy could not see through, or create a "window" where their vision could see through.
Video:
Target Platform: N/A
Download: N/A
Links: N/A
Summary:
Using a combination of lengthdir_x/y we can have any object shoot a ray out of their position and check to see what is in front of them, or beside them. We can transform this into a field of view and determine if we find a player object, or solid wall.
You can use this strategy to create walls that an enemy could not see through, or create a "window" where their vision could see through.
Video: