ball now more consistently collides with arbitrary objects and bounces off them appropriately

This commit is contained in:
2024-07-23 20:07:13 +02:00
parent 3fea3c89ed
commit 091d957d26
7 changed files with 147 additions and 102 deletions
+9 -8
View File
@@ -1,9 +1,10 @@
extends Area2D
extends StaticBody2D
func _on_ball_shape_entered(body_rid, body, body_shape_index, local_shape_index):
print("FUCK YES")
match self.shape_owner_get_owner(local_shape_index).boundary_invert_axis:
0: # x
body.invert_x()
1: # y
body.invert_y()
#func _on_ball_shape_entered(body_rid, body, body_shape_index, local_shape_index):
#print("FUCK YES")
#body.has_collided()
#match self.shape_owner_get_owner(local_shape_index).boundary_invert_axis:
#0: # x
#body.invert_x()
#1: # y
#body.invert_y()