Escolar Documentos
Profissional Documentos
Cultura Documentos
func _ready():
pass
func _physics_process(delta):
if Input.is_action_pressed("ui_right") and
Input.is_action_pressed("ui_left"):
vetor.x = 0
elif Input.is_action_pressed("ui_right"):
vetor.x = velocidade
$MeshInstance.rotate_z(deg2rad(-velocidade_rotacao))
elif Input.is_action_pressed("ui_left"):
vetor.x = -velocidade
$MeshInstance.rotate_z(deg2rad(velocidade_rotacao))
else:
vetor.x = 0