Attention | Topic was automatically imported from the old Question2Answer platform. | |
Asked By | MaskedKasper |
So i was making my first simple fps game . And after coding the bullets , it always collide with the fist kinematic body but then it rarely collide with the others . Here is an example
In my code the Ennemies(Kinematic Body) always register when it collide for 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()