refactored bullet script, broke shotgun pellets which will need to be fixed

This commit is contained in:
derek
2025-03-25 16:55:22 -05:00
parent 3e3a0d2192
commit 8d0f925be6
24 changed files with 1283 additions and 122 deletions

View File

@@ -36,6 +36,8 @@ var moving_fast_top_speed = 0.0
var mouse_input : Vector2
var ads : bool
var last_ground_pos
@export_group("Game Settings")
@export var AUDIO = true
@export_group("Player Movement")
@@ -473,6 +475,7 @@ func _physics_process(delta):
if GameGlobals.health <= 0:
level_control.die()
cache_ground_pos()
focus_on_target()
joypad_look()
aim_down_sights(delta)
@@ -511,6 +514,10 @@ func joypad_look():
head.rotate_x(-yAxis * JOYSTICK_SENSITIVITY * 1)
head.rotation.x = clamp(head.rotation.x, deg_to_rad(-90), deg_to_rad(85))
func cache_ground_pos():
if is_on_floor():
last_ground_pos = global_position
func punch():
if interact_ray.is_colliding():
if interact_ray.get_collider().has_method("hit"):