Godot Version
4.4
Question
I have 3 different rigidbodies:
- A wall
- A box
- A bullet
The wall and bullet does not and should not collide. This is easily solved with the mask
I have this Box object, I move it around and collide/bounce with a wall. This works.
However, I also have ths bullet object. This should collide with the box and change the box color. This works, but the bullet also exhanges momentum with the box and makes it fly around.
I’ve tried making a custom func _on_body_entered(body: Node2D)
for the box. and set for the box:
contact_monitor = true
custom_integrator = true
max_contacts_reported = 1
but I am not able to ignore the box being accelated by the bullets. I am hoping I could do something like:
box.gd:
func _on_body_entered(body: Node2D):
if body.is_bullet:
self.change_color()
else if body.is_wall:
self.bounce()
but it seems like no matter what I do, the box always bounces around