extends MeshInstance3D
# Called when the node enters the scene tree for the first time.
func _ready():
pass # Replace with function body.
# Called every frame. 'delta' is the elapsed time since the previous frame.
func _process(delta):
pass
func _on_area_3d_area_entered(area):
rotate_y(2.5)
pass # Replace with function body.
-------------------------------------------------------------------------------------------------------------------------
--------------------------------------------------------------------------------------------------------------------------
Explicacion:
partiendo de un nodo MeshInstance3D con hijo un Area3d y un nieto CollisionShape3D cuando algo toca el CollisionShape3D el MeshInstance3D gira, el script lo tiene el MeshInstance3D y la señal el Area3d......
No hay comentarios:
Publicar un comentario