Basic 3D compass (with LFS)
This commit is contained in:
@@ -1,5 +1,7 @@
|
||||
[gd_scene format=3 uid="uid://bx8vjd7wodbv"]
|
||||
|
||||
[ext_resource type="PackedScene" uid="uid://j2vmxn1p5hej" path="res://scenes/compass.tscn" id="1_5j21v"]
|
||||
|
||||
[node name="MainDisplay" type="Control" unique_id=735638234]
|
||||
layout_mode = 3
|
||||
anchors_preset = 15
|
||||
@@ -7,3 +9,19 @@ anchor_right = 1.0
|
||||
anchor_bottom = 1.0
|
||||
grow_horizontal = 2
|
||||
grow_vertical = 2
|
||||
|
||||
[node name="SubViewportContainer" type="SubViewportContainer" parent="." unique_id=1834501597]
|
||||
layout_mode = 1
|
||||
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" unique_id=697927821]
|
||||
handle_input_locally = false
|
||||
size = Vector2i(1152, 648)
|
||||
render_target_update_mode = 4
|
||||
|
||||
[node name="Compass" parent="SubViewportContainer/SubViewport" unique_id=1678590387 instance=ExtResource("1_5j21v")]
|
||||
|
||||
35
scenes/compass.tscn
Normal file
35
scenes/compass.tscn
Normal file
@@ -0,0 +1,35 @@
|
||||
[gd_scene format=3 uid="uid://j2vmxn1p5hej"]
|
||||
|
||||
[ext_resource type="Script" uid="uid://cgcgn8lwigumx" path="res://scripts/angle_display_3d.gd" id="1_8a3he"]
|
||||
[ext_resource type="Texture2D" uid="uid://cjw3n47kehnfj" path="res://assets/vector/dial.svg" id="1_vggt3"]
|
||||
[ext_resource type="PackedScene" uid="uid://0qb2f8igltax" path="res://assets/models/grey-seal-halichoerus-grypus/grey_seal_clean.glb" id="2_8a3he"]
|
||||
[ext_resource type="Script" uid="uid://cv5cmdlub5gtx" path="res://scenes/node_3d.gd" id="3_mut2o"]
|
||||
|
||||
[sub_resource type="StandardMaterial3D" id="StandardMaterial3D_mut2o"]
|
||||
transparency = 1
|
||||
cull_mode = 2
|
||||
shading_mode = 0
|
||||
albedo_color = Color(0.44361365, 0.72118443, 0, 1)
|
||||
albedo_texture = ExtResource("1_vggt3")
|
||||
|
||||
[sub_resource type="PlaneMesh" id="PlaneMesh_wivqi"]
|
||||
material = SubResource("StandardMaterial3D_mut2o")
|
||||
|
||||
[node name="Compass" type="Node3D" unique_id=1678590387]
|
||||
|
||||
[node name="AngleDisplay3D" type="Node3D" parent="." unique_id=741461034]
|
||||
script = ExtResource("1_8a3he")
|
||||
|
||||
[node name="MeshInstance3D" type="MeshInstance3D" parent="AngleDisplay3D" unique_id=1205234959]
|
||||
mesh = SubResource("PlaneMesh_wivqi")
|
||||
|
||||
[node name="Node3D" type="Node3D" parent="." unique_id=1404656477]
|
||||
script = ExtResource("3_mut2o")
|
||||
|
||||
[node name="grey_seal_clean" parent="Node3D" unique_id=476466866 instance=ExtResource("2_8a3he")]
|
||||
transform = Transform3D(2, 0, 0, 0, 1.5, 0, 0, 0, 1.5, 0, 0, 0)
|
||||
|
||||
[node name="Camera3D" type="Camera3D" parent="Node3D" unique_id=269443754]
|
||||
transform = Transform3D(0.7071068, -0.43045935, 0.5609855, 0, 0.7933534, 0.6087614, -0.7071068, -0.43045935, 0.5609855, 2, 2, 2)
|
||||
fov = 28.4
|
||||
size = 1.5
|
||||
11
scenes/node_3d.gd
Normal file
11
scenes/node_3d.gd
Normal file
@@ -0,0 +1,11 @@
|
||||
extends Node3D
|
||||
|
||||
|
||||
# Called when the node enters the scene tree for the first time.
|
||||
func _ready() -> void:
|
||||
pass # Replace with function body.
|
||||
|
||||
|
||||
# Called every frame. 'delta' is the elapsed time since the previous frame.
|
||||
func _process(delta: float) -> void:
|
||||
self.rotate_y(delta * 0.1)
|
||||
1
scenes/node_3d.gd.uid
Normal file
1
scenes/node_3d.gd.uid
Normal file
@@ -0,0 +1 @@
|
||||
uid://cv5cmdlub5gtx
|
||||
Reference in New Issue
Block a user