We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents 1916f87 + 7a7af4c commit 44aefaeCopy full SHA for 44aefae
2d/bullet_shower/bullets.gd
@@ -38,6 +38,10 @@ func _ready():
38
39
Physics2DServer.body_set_space(bullet.body, get_world_2d().get_space())
40
Physics2DServer.body_add_shape(bullet.body, shape)
41
+ # Don't make bullets check collision with other bullets to improve performance.
42
+ # Their collision mask is still configured to the default value, which allows
43
+ # bullets to detect collisions with the player.
44
+ Physics2DServer.body_set_collision_layer(bullet.body, 0)
45
46
# Place bullets randomly on the viewport and move bullets outside the
47
# play area so that they fade in nicely.
0 commit comments