[gd_scene load_steps=9 format=3 uid="uid://do1wif8rpqtwj"]

[ext_resource type="Script" uid="uid://f60byrk7xjak" path="res://addons/godot-xr-tools/functions/function_gaze_pointer.gd" id="1_ipkdr"]
[ext_resource type="Material" path="res://addons/godot-xr-tools/materials/pointer.tres" id="2_ndm62"]
[ext_resource type="Shader" uid="uid://dncfip67nl2sf" path="res://addons/godot-xr-tools/misc/hold_button_gaze_pointer_visualshader.tres" id="3_1p5pd"]

[sub_resource type="BoxMesh" id="1"]
resource_local_to_scene = true
material = ExtResource("2_ndm62")
size = Vector3(0.002, 0.002, 10)
subdivide_depth = 20

[sub_resource type="SphereMesh" id="2"]
material = ExtResource("2_ndm62")
radius = 0.05
height = 0.1
radial_segments = 16
rings = 8

[sub_resource type="SphereShape3D" id="SphereShape3D_k3gfm"]
radius = 0.2

[sub_resource type="QuadMesh" id="QuadMesh_lulcv"]
resource_local_to_scene = true

[sub_resource type="ShaderMaterial" id="ShaderMaterial_ico2c"]
render_priority = -100
shader = ExtResource("3_1p5pd")
shader_parameter/albedo = Color(1, 1, 1, 1)
shader_parameter/value = 0.2
shader_parameter/fade = 0.05
shader_parameter/radius = 0.8
shader_parameter/width = 0.2

[node name="FunctionGazePointer" type="Node3D"]
script = ExtResource("1_ipkdr")
show_laser = 0
show_target = true

[node name="RayCast" type="RayCast3D" parent="."]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, -0.013, 0)
target_position = Vector3(0, 0, -10)
collision_mask = 5242880

[node name="Laser" type="MeshInstance3D" parent="."]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, -0.013, -5)
visible = false
cast_shadow = 0
mesh = SubResource("1")

[node name="Target" type="MeshInstance3D" parent="."]
visible = false
mesh = SubResource("2")

[node name="SuppressArea" type="Area3D" parent="."]
collision_layer = 0
collision_mask = 4194304

[node name="CollisionShape3D" type="CollisionShape3D" parent="SuppressArea"]
shape = SubResource("SphereShape3D_k3gfm")

[node name="Visualise" type="MeshInstance3D" parent="."]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, -1)
cast_shadow = 0
mesh = SubResource("QuadMesh_lulcv")
surface_material_override/0 = SubResource("ShaderMaterial_ico2c")
