![]() |
Attention | Topic was automatically imported from the old Question2Answer platform. |
![]() |
Asked By | MaskedKasper |
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
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()
do the bullets realy intersect the boxes? or are they “jumping” through the boxes because of their speed?
klaas | 2020-07-17 17:18
yea they interact with some
MaskedKasper | 2020-07-18 17:43