extends MeshInstance3D
var is_rotating = false
var is_rotating2 = false
# Called when the node enters the scene tree for the first time.
func _ready() -> void:
pass # Replace with function body.
func _input(event):
if event is InputEventMouseButton:
if event.pressed and event.button_index == 1:
is_rotating = true
else:
is_rotating = false
if event is InputEventMouseButton:
if event.pressed and event.button_index == 2:
is_rotating2 = true
else:
is_rotating2 = false
func _process(delta: float) -> void:
if is_rotating:
rotate_y(0.0009)
if is_rotating2:
rotate_y(-0.0009)
--------------------------------------------------------------------------------------------------------------------
En su eje "y" un MeshInstance3D un cubo en forma de viga que sujeta una camara en un extremo, hacemos que gire presionando botones del mouse..........
No hay comentarios:
Publicar un comentario