pretty happy with basic AI behavior

This commit is contained in:
derek
2025-04-29 11:02:12 -05:00
parent ccb4781460
commit a287710a7b
10 changed files with 86 additions and 75 deletions

View File

@@ -84,7 +84,7 @@ func _process(delta):
cam_target.global_position = lerp(cam_target.global_position,target_pos_adjusted,delta * MOVE_SPEED)
look_ray.global_position = target_pos_adjusted
look_ray.look_at(Vector3(target.global_position), Vector3.UP)
camera.rotation = lerp_angle(camera.rotation,look_ray.rotation,delta * CAMERA_LOOK_SPEED)
camera.rotation = lerp(camera.rotation,look_ray.rotation,delta * CAMERA_LOOK_SPEED)
camera.fov = lerp(camera.fov, 40.0, delta * 5)
1:
#aim at player from enemy