pretty happy with basic AI behavior
This commit is contained in:
@@ -55,10 +55,4 @@ func Physics_Update(delta : float):
|
||||
var direction = local_destination.normalized()
|
||||
if enemy.global_position.distance_to(local_destination) > 1:
|
||||
enemy.velocity = direction * idle_speed
|
||||
enemy.spider_look_next.look_at(destination)
|
||||
var look_target = enemy.spider_look_next.global_rotation.y
|
||||
enemy.global_rotation.y = lerp(enemy.global_rotation.y,look_target,delta * 3)
|
||||
|
||||
|
||||
if enemy.turret_look.is_colliding() and enemy.turret_look.get_collider() is Player:
|
||||
Transitioned.emit(self,"attack")
|
||||
enemy.global_rotation.y = rotate_to_face2D(enemy,destination,delta,turret_speed)
|
||||
|
||||
Reference in New Issue
Block a user