Now About Social Code
summaryrefslogtreecommitdiff
path: root/scripts/enemy.gd
diff options
context:
space:
mode:
authorLucas Fryzek <lucas.fryzek@fryzekconcepts.com>2024-09-23 19:35:54 +0100
committerLucas Fryzek <lucas.fryzek@fryzekconcepts.com>2024-09-23 19:35:54 +0100
commit03080afab1ace191d0fda29845b033887e6e49f3 (patch)
tree99275b941046522393d84ac1399410b5c69c5263 /scripts/enemy.gd
parentb262d5d194036571d0b3adad3c9914ba9dbe0c8b (diff)
bsp_level_generator: Fix walls generating past the end of the room
enemy: Fix seeing through walls
Diffstat (limited to 'scripts/enemy.gd')
-rw-r--r--scripts/enemy.gd6
1 files changed, 1 insertions, 5 deletions
diff --git a/scripts/enemy.gd b/scripts/enemy.gd
index 871145b..8c5652f 100644
--- a/scripts/enemy.gd
+++ b/scripts/enemy.gd
@@ -80,13 +80,9 @@ func check_target_visible() -> bool:
var space_state = get_world_3d().direct_space_state
var starting_pos = global_position
var ending_pos = target.global_position + Vector3.UP
- var query = PhysicsRayQueryParameters3D.create(starting_pos, ending_pos, 0x3, [self.get_rid()])
+ var query = PhysicsRayQueryParameters3D.create(starting_pos, ending_pos, 0xFFFFFFFF, [self.get_rid()])
var result = space_state.intersect_ray(query)
- print("Checking player")
- if result:
- print("Hit ", result.collider, " Target ", target, " Self ", self)
-
if result and result.collider == target:
return true