quick tweaks
This commit is contained in:
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user