|Attention||Topic was automatically imported from the old Question2Answer platform.|
I am quite new to Godot still and pretty new to GameDev overall (especially in 3D)
I have a spawner in my world scene which spawns obstacles that I want to get deleted when they hit the player. (3D BTW)
The player is a KinematicBody and the Obstacles are RigidBodies. I try to use the signal body_entered to trigger and event through a signal but it never activates.
Contact Monitor is on, Contacts Reported is set to 1000 just to be sure, I have a collisionshape as a child of the RigidBody, I’ve set and double checked collision layers and they should be fine (as if I enable collision on the mesh of an obstacle it works fine).
Not really sure what to try next or how to approach this
Code for the collision below:
extends RigidBody # Declare member variables here. Examples: # var a = 2 # var b = "text" export (int) var speed; # Called when the node enters the scene tree for the first time. func _ready(): connect("body_entered", self, "_on_Obstacle_body_entered") apply_impulse(transform.basis.z, transform.basis.z * speed) # Called every frame. 'delta' is the elapsed time since the previous frame. #func _process(delta): # pass #func _physics_process(delta): # func _on_Timer_timeout(): queue_free() pass # Replace with function body. func _on_Obstacle_body_entered(body): print("I AM COLLIDING") pass # Replace with function body.