Receiver that is blocked by walls?
I'm trying to give an enemy 'eyes' so to speak, and I want something to happen when the player enters the enemy's line of sight. Currently I'm experimenting with the wireless transmitter and receiver and it works well but the line of sight isn't blocked by walls. How would I go about this?
-
Can you use a laser scope in some capacity to see if it has line of sight?
-
'@dr_murk
thanks for the tip I think I can figure it out now, the scope can collide with walls and I can turn on or off the wireless receiver with the scope so it's a start at least -
If I were you, I'd attach like 10 lasers point in different directions.
-
I'm trying it with having 3 wireless receivers as cones for the left, middle and right sections of the enemy's field of view and having each one turned on or off with a different laser pointing in the relevant direction
-
A pair of laser pointers that point at the player can tell you what the respective distances are to the player and to the first thing in line of sight - either the player or something in between. Then if the player is the closest, check the angle of the pointers against a reference coming out of the enemy's 'eyes' and if it's within a certain range, the enemy is alerted?
-
'@QuietlyWrong Thanks for this. I understand in theory and this sounds like the best solution so far. Gonna need to spend more time learning logic to test it.
-
I hope it works - I haven't tried laser scopes yet! O_o
-
Check CCTV camera and get all the logic you want. I ve left it remixable.
-
Welp, after a few different attempts I ended up going with the point heaps of lasers in different directions idea. I made an array of blocks then copy-pasted lasers pointing forward onto each one.
I made a playable demo of it working, search "field of view laser array mask test gameplay" to see.
Por favor, entrar para comentar.