This commit is contained in:
karl 2020-02-02 16:18:05 +01:00
commit 465ef4c3e0

View File

@ -123,13 +123,13 @@ 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 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:
# 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
else: