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:
@@ -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()
|
||||
Reference in New Issue
Block a user