bugfix: adjust 'limits' on upper/lower X value to be dynamic, rather than static
This commit is contained in:
@@ -67,7 +67,7 @@ func _process(delta: float) -> void:
|
|||||||
if bounce:
|
if bounce:
|
||||||
velocity = -(velocity)/2
|
velocity = -(velocity)/2
|
||||||
print("velocity negated, bouncing")
|
print("velocity negated, bouncing")
|
||||||
global_position.x = 999
|
global_position.x = max_x - 1
|
||||||
time_since_first_location = -1
|
time_since_first_location = -1
|
||||||
draggable = true
|
draggable = true
|
||||||
return
|
return
|
||||||
@@ -76,7 +76,7 @@ func _process(delta: float) -> void:
|
|||||||
if bounce:
|
if bounce:
|
||||||
velocity = -(velocity)/2
|
velocity = -(velocity)/2
|
||||||
print("velocity negated, bouncing")
|
print("velocity negated, bouncing")
|
||||||
global_position.x = 1
|
global_position.x = min_x + 1
|
||||||
time_since_first_location = -1
|
time_since_first_location = -1
|
||||||
draggable = true
|
draggable = true
|
||||||
return
|
return
|
||||||
|
|||||||
Reference in New Issue
Block a user