[gd_scene load_steps=5 format=3 uid="uid://cc5emorildoar"]

[ext_resource type="Environment" uid="uid://c1i78mwq3ug2f" path="res://Scenes/Enivornment.tres" id="1_3jquc"]
[ext_resource type="ArrayMesh" uid="uid://d7b2roon4kjw" path="res://Models/machinegun.obj" id="1_lxd3t"]
[ext_resource type="Shader" path="res://Scenes/Crosshair.gdshader" id="3_avtvy"]

[sub_resource type="ShaderMaterial" id="ShaderMaterial_foxul"]
shader = ExtResource("3_avtvy")
shader_parameter/center_enabled = true
shader_parameter/legs_enabled = true
shader_parameter/inverted = false
shader_parameter/color_id = 0
shader_parameter/color_0 = Vector4(0, 1, 0, 1)
shader_parameter/color_1 = Vector4(1, 0, 0, 1)
shader_parameter/color_2 = Vector4(0, 0, 1, 1)
shader_parameter/center_radius = 0.002
shader_parameter/width = 0.002
shader_parameter/len = 0.025
shader_parameter/spacing = 0.008
shader_parameter/spread = 1.0

[node name="Gun" type="Node3D"]

[node name="SubViewportContainer" type="SubViewportContainer" parent="."]
light_mask = 2
visibility_layer = 2
anchors_preset = 15
anchor_right = 1.0
anchor_bottom = 1.0
grow_horizontal = 2
grow_vertical = 2
stretch = true

[node name="SubViewport" type="SubViewport" parent="SubViewportContainer"]
transparent_bg = true
handle_input_locally = false
size = Vector2i(1152, 648)
render_target_update_mode = 4

[node name="Camera3D" type="Camera3D" parent="SubViewportContainer/SubViewport"]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, -38809.9, 0)
cull_mask = 1047554
environment = ExtResource("1_3jquc")

[node name="Machinegun" type="MeshInstance3D" parent="SubViewportContainer/SubViewport/Camera3D"]
transform = Transform3D(-8, 0, -1.20797e-06, 0, 8, 0, 1.20797e-06, 0, -8, 0.355038, -0.26573, -0.622725)
layers = 2
mesh = ExtResource("1_lxd3t")
skeleton = NodePath("../../../..")

[node name="Crosshair" type="Control" parent="."]
layout_mode = 3
anchors_preset = 15
anchor_right = 1.0
anchor_bottom = 1.0
grow_horizontal = 2
grow_vertical = 2

[node name="ColorRect" type="ColorRect" parent="Crosshair"]
material = SubResource("ShaderMaterial_foxul")
layout_mode = 1
anchors_preset = 15
anchor_right = 1.0
anchor_bottom = 1.0
grow_horizontal = 2
grow_vertical = 2
