Added Night stand animation to open and close when interacted with and fixed interaction ray so I don't have to use classes and I can just have it use the intractable physics layer

This commit is contained in:
2024-07-17 00:01:20 -05:00
parent ddb2b3931a
commit e0c2c33495
5 changed files with 145 additions and 2 deletions

View File

@ -0,0 +1,13 @@
extends StaticBody3D
@export var promt_message:String = "press e"
@export var promt_key:String
var is_open = false
func interact(player):
if not is_open:
$AnimationPlayer.play("Open")
is_open = true
else:
$AnimationPlayer.play("Close")
is_open = false