extends MeshInstance3D
func _input(event):
# Comprobamos si es un evento de teclado
if event is InputEventKey:
if event.pressed:
if event.keycode == KEY_Z:
rotate_x(0.02)
elif event.keycode == KEY_X:
rotate_x(-0.02)
# Comprobamos si es un evento de acción de entrada
elif event is InputEventAction:
pass
#func _input(event):
if event is InputEventMouseButton:
if event.pressed and event.is_action("mouse_rueda_arriba"):
#if event.action == "mouse_rueda_arriba":
rotate_x(-0.02)
elif event.pressed and event.is_action("mouse_rueda_avajo"):
#elif event.action == "mouse_rueda_avajo":
rotate_x(0.02)
No hay comentarios:
Publicar un comentario