Turret Laserpointer and raycast selfcollision fix
This commit is contained in:
parent
c3255b30f2
commit
85348bbd3f
@ -42,6 +42,7 @@ func searching():
|
||||
var collider = sightline.get_collider()
|
||||
if collider.is_in_group("player"):
|
||||
prey_ref = weakref(collider)
|
||||
break
|
||||
|
||||
# TODO should this stand still?
|
||||
# TODO Use yield and coroutine instead
|
||||
|
||||
@ -101,7 +101,7 @@ collision_mask = 123
|
||||
rotation = 0.0698132
|
||||
enabled = true
|
||||
cast_to = Vector2( 0, 100000 )
|
||||
collision_mask = 123
|
||||
collision_mask = 121
|
||||
|
||||
[node name="Sightline2" type="RayCast2D" parent="SightCone"]
|
||||
rotation = -0.0698132
|
||||
|
||||
@ -54,7 +54,7 @@ func _get_transition(_delta):
|
||||
parent.get_node("StateLabel").text = self.state
|
||||
var new_state
|
||||
if parent.is_tracking_prey() && self.state == "searching":
|
||||
laserpoint.visible = true
|
||||
laserpoint.visible = false
|
||||
new_state = "locking"
|
||||
# TODO Helper function with null check and reference check
|
||||
if !parent.is_tracking_prey() && self.state == "shooting":
|
||||
|
||||
Loading…
Reference in New Issue
Block a user