Attention | Topic was automatically imported from the old Question2Answer platform. | |
Asked By | MrCargon |
How can i transport the area_3D position in a script ?`
extends Spatial
onready var camera =$Camera_first_person/Camera#yust a camera
onready var camera_follow =$Camera_target_3D/Camera_follow#camera with spring_aram
onready var area_touch =$Interaction_action#area3d
var monument_touch = false
func _ready():
pass
func _process(delta):
if monument_touch == true:
if Input.is_action_pressed(“_Interact”):
get_tree().change_scene(“res://Scenes/GameOverScreen.tscn”)
Input.set_mouse_mode(Input.MOUSE_MODE_VISIBLE)
func _input(event):
if Input.is_action_pressed(“player_switch”):
if camera_follow.is_current():
camera_follow.clear_current(true)
elif camera.is_current():
camera.clear_current(true)
func _on_Player_timer_core_Game_Over():#in here i need to add area_touch to disapere
if camera_follow.is_current():
camera_follow.clear_current(true)
pass
func _on_Area_monument_area_entered(area):
if area.get_name() == “Interaction_action”:
monument_touch = true