improvements to ai but still needs a lot of work
This commit is contained in:
@@ -22,7 +22,7 @@ func Enter():
|
||||
alarm_sound.play()
|
||||
|
||||
func update_waypoint():
|
||||
enemy.nav_agent.set_target_position(enemy.character_follow.global_position)
|
||||
enemy.nav_agent.set_target_position(move_target())
|
||||
|
||||
func current_target():
|
||||
if enemy.is_player_visible():
|
||||
@@ -65,7 +65,7 @@ func Update(delta):
|
||||
Transitioned.emit(self,"reload")
|
||||
|
||||
func Physics_Update(delta):
|
||||
enemy.turret_look_next.look_at(enemy.character_follow.global_position)
|
||||
enemy.turret_look_next.look_at(move_target())
|
||||
enemy.turret_look.rotation = lerp(enemy.turret_look.rotation,enemy.turret_look_next.rotation,delta * enemy.turret_look_speed)
|
||||
|
||||
var destination = enemy.nav_agent.get_next_path_position()
|
||||
|
||||
Reference in New Issue
Block a user