Created Front Door and Medical Symbol on building. Doors have yet to be finished

This commit is contained in:
Unknown
2024-09-17 15:46:06 -05:00
parent 7205f9651c
commit 581ea25567
7 changed files with 93 additions and 2 deletions

View File

@ -0,0 +1,18 @@
extends MeshInstance3D
@export_range(0.1,1,.01) var step:float
var open:float = 0.0
var is_opening:bool = false
# Called every frame. 'delta' is the elapsed time since the previous frame.
func _process(delta: float) -> void:
if is_opening:
open = open + step
open = clampf(open, 0.0, 1.0)
else:
open = open - step
open = clampf(open, 0.0, 1.0)
set_blend_shape_value(0, open)
func _on_interactable_interaction() -> void:
is_opening = !is_opening