ball now more consistently collides with arbitrary objects and bounces off them appropriately
This commit is contained in:
@@ -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()
|
||||
|
||||
Reference in New Issue
Block a user