This commit is contained in:
Leon Palluch committed 2020-02-01 18:36:57 +01:00
commit ba6aee1c91
18 files changed
+118 -35

No files matched your search

+6 -4
View File
@@ -81,10 +81,12 @@ func _input(event):
if event is InputEventMouseButton:
if event.pressed:
if _viewport.get_viewport().get_mouse_position().x >= 0:
if event.button_index == BUTTON_WHEEL_UP:
_attachment_point.get_node("Limb").rotate_z(0.1)
elif event.button_index == BUTTON_WHEEL_DOWN:
_attachment_point.get_node("Limb").rotate_z(-0.1)
if event.button_index == BUTTON_WHEEL_UP and _attachment_point != null:
if _attachment_point.get_node("Limb") != null:
_attachment_point.get_node("Limb").rotate_z(0.1)
elif event.button_index == BUTTON_WHEEL_DOWN and _attachment_point != null:
if _attachment_point.get_node("Limb") != null:
_attachment_point.get_node("Limb").rotate_z(-0.1)
else:
_prev_mouse_pos = event.position
_viewRot = true