quick tweaks

This commit is contained in:
derek
2024-07-22 17:04:04 -05:00
parent a7b8613329
commit 356455ba29
3 changed files with 6 additions and 2 deletions

View File

@@ -8,6 +8,7 @@ var instance_bullethole
var bullet_force_mod = 1.0
var distance_from_player
var player_position
var player_velocity
@onready var mesh = $gunbullet1
@onready var ray = $RayCast3D
@@ -40,6 +41,7 @@ func _ready():
# Called every frame. 'delta' is the elapsed time since the previous frame.
func _process(delta):
position += transform.basis * Vector3(0, 0, -bullet_speed) * delta
print(player_velocity)
rotation.x = clamp(rotation.x - delta * bullet_drop,deg_to_rad(-90),deg_to_rad(90))
distance_from_player = abs(self.global_position - player_position)