person can take and interact with item
This commit is contained in:
@@ -5,9 +5,9 @@ extends Node3D
|
||||
@export var meshInstance: MeshInstance3D
|
||||
@export var preview_shader: ShaderMaterial
|
||||
@export var ActionNode: Node3D
|
||||
|
||||
@export var static_body: StaticBody3D
|
||||
var default_shaders: Array
|
||||
var static_body: StaticBody3D
|
||||
#var static_body: StaticBody3D
|
||||
#var ActionNode: Node3D
|
||||
var is_placed: bool = false
|
||||
|
||||
@@ -18,6 +18,8 @@ func _ready() -> void:
|
||||
|
||||
static_body = $StaticBody3D
|
||||
|
||||
static_body.mouse_entered.connect(_on_mouse_enter)
|
||||
static_body.mouse_exited.connect(_on_mouse_exit)
|
||||
|
||||
ActionNode = $ActionNode
|
||||
|
||||
@@ -54,12 +56,8 @@ func _on_preview_create():
|
||||
|
||||
|
||||
func _on_object_placed(build_postion):
|
||||
|
||||
is_placed = true
|
||||
static_body.input_ray_pickable = true
|
||||
static_body.mouse_entered.connect(_on_mouse_enter)
|
||||
static_body.mouse_exited.connect(_on_mouse_exit)
|
||||
restore_default_shaders()
|
||||
|
||||
|
||||
|
||||
func enable_outline():
|
||||
|
||||
Reference in New Issue
Block a user