From 998a91e6b8d9ec3b6a6455f9685db650231bfc71 Mon Sep 17 00:00:00 2001 From: cflip Date: Sat, 24 Sep 2022 21:52:35 -0600 Subject: Reduce scale of entire scene by 5 and upscale the window instead --- scripts/basketball.gd | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'scripts') diff --git a/scripts/basketball.gd b/scripts/basketball.gd index 14e898d..d9387de 100644 --- a/scripts/basketball.gd +++ b/scripts/basketball.gd @@ -1,7 +1,7 @@ extends RigidBody2D export var spin_speed = -1 -export var move_speed = 300 +export var move_speed = 60 var start_position var is_dragging = false @@ -28,7 +28,7 @@ func toggle_mode(): set_use_custom_integrator(waiting_for_shoot) func shoot(): - apply_impulse(Vector2(10, 10), Vector2(power)) + apply_impulse(Vector2(2, 2), Vector2(power)) # Override the default physics when we want to manually set the position and rotation. func _integrate_forces(state): @@ -46,7 +46,7 @@ func _process(delta): start_position.x -= move_speed * delta if Input.is_action_pressed("ui_right"): start_position.x += move_speed * delta - start_position.x = clamp(start_position.x, 0, 1024) + start_position.x = clamp(start_position.x, 0, get_viewport_rect().size.x) func _input(event): if event.is_action_pressed("shoot") and ready_to_hold and waiting_for_shoot: -- cgit v1.2.3