Merge branch 'master' of github.com:unfa/liblast

remotes/1699310152913738325/tmp_refs/heads/legacy
unfa 2021-04-12 21:46:06 +02:00
commit 1e2ec5120c
3 changed files with 12 additions and 17 deletions

View File

@ -1,24 +1,18 @@
extends Spatial
var first = true
var velocity = 4
var velocity = 200
# Declare member variables here. Examples:
# var a = 2
# var b = "text"
# Called when the node enters the scene tree for the first time.
func _ready():
pass # Replace with function body.
translate_object_local(Vector3(-10,0,0))
set_process(true)
# Called every frame. 'delta' is the elapsed time since the previous frame.
func _process(delta):
if first:
translate_object_local(Vector3(- rand_range(0, velocity) - velocity*3 ,0 ,0))
first = false
else:
translate_object_local(Vector3(-velocity,0,0))
translate_object_local(Vector3(-velocity * delta,0,0))
const casing = preload("res://Assets/Weapons/Handgun/Casing.gd")
func _on_Raycast_body_entered(body):
#print("Tracer died:", body)
queue_free()
if not (body is Player) and not (body is casing):
queue_free()

View File

@ -221,7 +221,7 @@ script = ExtResource( 8 )
transform = Transform( 1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 1.53592, -0.0651628 )
[node name="Hand" type="Spatial" parent="Camera"]
transform = Transform( -4.37114e-08, 0, -1, 0, 1, 0, 1, 0, -4.37114e-08, 0.335, -0.394248, -0.559 )
transform = Transform( -4.37114e-08, 0, -1, 0, 1, 0, 1, 0, -4.37114e-08, 0.335, -0.399991, -0.559 )
[node name="WeaponBobAnimationTree" type="AnimationTree" parent="Camera/Hand"]
tree_root = SubResource( 12 )

View File

@ -112,8 +112,9 @@ func show_muzzle_flash(var rounds_left):
func show_tracer():
var tracer_instance = tracer.instance()
tracer_instance.hide()
tracer_instance.global_transform = muzzle.global_transform
tracer_instance.global_transform = global_transform
tracer_instance.translation = $Model/Muzzle.global_transform.origin
get_tree().root.call_deferred("add_child", tracer_instance)
tracer_instance.call_deferred("show")