Godot Version
v4.4.1.stable.official
Question
Currently trying to get bullets in my game to collide with the environment. They collide with enemies but not the floor or walls.
Here’s the bullets code, tree and inspector bullets are on collision layer 6 with walls and floors on 3
func _on_body_entered(body: Node3D) -> void:
#debug body
print("hit: " + str(body))
#check for damage function in body
#set position for range calc
#calculate damage using the range on the curve
#deal damage to body
if "hit" in body:
position = body.get("position")
shot_range = (position-starting_pos).length()
final_damage = damage * damage_dropoff.sample(shot_range / bullet_range)
#debug damage
print("damage=" + str(final_damage))
body.hit(final_damage)
#delete bullet
queue_free()
Bullets:
Walls and Floor:
Please let me know if any additional info is needed thank you for the help.