added a basic ball that properly inverts velocity when colliding with a world boundary. my balls are getting stuck on each other tho

This commit is contained in:
2024-07-23 18:22:05 +02:00
parent 95fe8fbeff
commit 6b0843a725
11 changed files with 255 additions and 10 deletions
+9
View File
@@ -0,0 +1,9 @@
extends Area2D
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()