diff options
author | IcECreAm777 <31211782+IcECreAm777@users.noreply.github.com> | 2022-07-17 04:32:58 +0200 |
---|---|---|
committer | IcECreAm777 <31211782+IcECreAm777@users.noreply.github.com> | 2022-07-17 04:32:58 +0200 |
commit | 7e66ac4ff518e6aa091c7ccfe567e31fa1f51994 (patch) | |
tree | dafa109d8d7473f1e8add0c05e3f5b8140165ae0 /godot/scenes/Die.gd | |
parent | b48d4853d0e6a6c627043f53e100354e523c29c1 (diff) | |
download | 2022-7e66ac4ff518e6aa091c7ccfe567e31fa1f51994.tar.gz 2022-7e66ac4ff518e6aa091c7ccfe567e31fa1f51994.tar.bz2 2022-7e66ac4ff518e6aa091c7ccfe567e31fa1f51994.zip |
made sure strokes are updated after each one
Diffstat (limited to 'godot/scenes/Die.gd')
-rw-r--r-- | godot/scenes/Die.gd | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/godot/scenes/Die.gd b/godot/scenes/Die.gd index 9341bc1..878b7be 100644 --- a/godot/scenes/Die.gd +++ b/godot/scenes/Die.gd @@ -14,7 +14,7 @@ var mouse_origin = Vector2(0,0) var die_launch_force_magnitude = 0 var die_launch_force_direction = Vector3(0,0,0) var die_launch_force = Vector3(0,0,0) -var die_launch_force_multiplier = 0.05 +var die_launch_force_multiplier = 0.001 var left_pressed = false var mat @@ -60,8 +60,9 @@ func _input(event): die_launch_force_direction = $CamRoot/Horizontal/Vertical/Camera.get_global_transform().basis die_launch_force_direction = -die_launch_force_direction.z die_launch_force = die_launch_force_direction * die_launch_force_magnitude * die_launch_force_multiplier - self.apply_central_impulse(die_launch_force) + self.apply_impulse(global_transform.origin, die_launch_force) Input.set_mouse_mode(Input.MOUSE_MODE_CAPTURED) + _game.add_stroke() if event is InputEventMouseMotion: camrot_h += -event.relative.x * sensitivity |