Drag the player This is a simple example of how raycasting can be used to detect if a player is in an enemy's line of range in a top-down shooter. What it does is a raycasting line goes to the enemy and shoots out in the enemy's peripheral vision range. If it touches a wall or the edge it means that it does not see the player, however if it touches the player that means that the player's detected. Drag the white ball (player) to see the effects. Untick the "run without screen refresh" on the "raycast" custom block to see a single-stepping mode.