Просмотр исходного кода

:wrench: Disable collisions between chickens

To prevent them to block one another.
DricomDragon 2 лет назад
Родитель
Сommit
3f56e994fb

+ 1 - 0
godot/component/entity/chick/Chicken.tscn

@@ -7,6 +7,7 @@
 radius = 34.9763
 
 [node name="Chicken" type="KinematicBody2D" groups=["chicken"]]
+collision_layer = 2
 script = ExtResource( 2 )
 
 [node name="AnimatedSprite" type="AnimatedSprite" parent="."]

+ 1 - 0
godot/component/entity/player/Player.tscn

@@ -7,6 +7,7 @@
 radius = 15.9444
 
 [node name="Player" type="Area2D"]
+collision_mask = 3
 script = ExtResource( 1 )
 __meta__ = {
 "_edit_group_": true

+ 1 - 0
godot/component/entity/wheel/Wheel.tscn

@@ -11,6 +11,7 @@ bounce = 0.9
 radius = 33.1812
 
 [node name="Wheel" type="RigidBody2D" groups=["wheel"]]
+collision_mask = 3
 mass = 0.5
 physics_material_override = SubResource( 2 )
 angular_damp = 0.0

+ 5 - 0
godot/project.godot

@@ -50,6 +50,11 @@ window/size/resizable=false
 window/stretch/mode="2d"
 window/stretch/aspect="keep"
 
+[layer_names]
+
+2d_physics/layer_1="entities"
+2d_physics/layer_2="chickens"
+
 [physics]
 
 2d/default_gravity=0