extends MeshInstance3D
func _process(delta):
rotate_y(0.01)
pass
func _unhandled_input(event):
if event is InputEventKey:
if event.pressed and event.keycode == KEY_6:
rotate_y(90.88)
$AudioStreamPlayer3D.play()
if event.pressed and event.keycode == KEY_W:
rotate_y(0.33)
$AudioStreamPlayer3D.play()
if event.pressed and event.keycode == KEY_A:
rotate_y(0.44)
$AudioStreamPlayer3D.play()
if event.pressed and event.keycode == KEY_D:
rotate_y(0.41)
$AudioStreamPlayer3D.play()
if event.pressed and event.keycode == KEY_S:
rotate_y(0.48)
$AudioStreamPlayer3D.play()
if event.pressed and event.keycode == KEY_I:
rotate_y(0.33)
$AudioStreamPlayer3D.play()
if event.pressed and event.keycode == KEY_J:
rotate_y(0.33)
$AudioStreamPlayer3D.play()
if event.pressed and event.keycode == KEY_K:
rotate_y(0.33)
$AudioStreamPlayer3D.play()
if event.pressed and event.keycode == KEY_L:
rotate_y(0.33)
$AudioStreamPlayer3D.play()
------------------------------------------------------------------------------------------------------------------------
--------------------------------------------------------------------------------------------------------------------------
explicacion:::::::::
--------------------------------------------------------------------------------------------------------------------------
func _process(delta):
rotate_y(0.01)
pass
estas lineas dan giro constantemente---------------------
func _unhandled_input(event):
if event is InputEventKey:
if event.pressed and event.keycode == KEY_6:
rotate_y(90.88)
$AudioStreamPlayer3D.play()
estas lineas dan giro solamente al presionar tecla numero 6 y lo giran a mayor velocidad--------------------