so i was making my first fps game . after coding the bullets and testing it the fist bullet always collide but then it rarely collide
https://imgur.com/a/ZyO7v1K
the ennemies(kinematicbody) works fine in calculating the score so i guess the problem is with the bullets code
extends Area
var speed = 100
var velocity = Vector3()
onready var timer = get_node("Timer")
func start(xform):
transform = xform
velocity = + transform.basis.x * speed
func _process(delta):
transform.origin += velocity * delta
func _on_Bullets_body_entered(body):
if body.get_name() == "Ennemy1":
body.queue_free()
func _on_Timer_timeout():
self.queue_free()