bullet collision seems fixed

This commit is contained in:
derek
2024-07-17 10:53:24 -05:00
parent 7ca4bc7750
commit 119d12b3da
10 changed files with 19 additions and 16 deletions

View File

@@ -7,6 +7,7 @@ extends RigidBody3D
var rng = RandomNumberGenerator.new()
var rand_amt
var player
# Called when the node enters the scene tree for the first time.
func _ready():
@@ -16,3 +17,8 @@ func _ready():
collision_shape.disabled = true
await get_tree().create_timer(1).timeout
self.queue_free()
func _physics_process(delta):
if player != null:
var float_direction = player.global_position - self.position
self.set_linear_velocity(float_direction * 10)