nature-sim/Entities/Tree/Tree.tscn
Dan Baker f98773237e Implements tree visibility occlusion system.
Adds tree fading based on camera line of sight.
Trees now fade out when they obstruct the player's view,
improving visibility.

Also includes several fixes:
- Fixes tree distribution.
- Adds a see-through shader.
- Adds camera and occlusion scripts.
2025-07-01 10:32:21 +01:00

37 lines
1.3 KiB
Text

[gd_scene load_steps=5 format=3 uid="uid://c27fogucecn0r"]
[ext_resource type="Script" uid="uid://lcedx3lau6v5" path="res://Entities/Tree/scripts/tree.gd" id="1_702jv"]
[sub_resource type="CapsuleShape3D" id="CapsuleShape3D_s6kdm"]
radius = 0.2
height = 0.5
[sub_resource type="SphereShape3D" id="SphereShape3D_702jv"]
[sub_resource type="CapsuleShape3D" id="CapsuleShape3D_702jv"]
radius = 0.6
[node name="Tree" type="Node3D"]
script = ExtResource("1_702jv")
[node name="TreeCollision" type="StaticBody3D" parent="." groups=["tree"]]
[node name="CollisionShape3D" type="CollisionShape3D" parent="TreeCollision"]
shape = SubResource("CapsuleShape3D_s6kdm")
[node name="InteractRange" type="Area3D" parent="."]
[node name="CollisionShape3D" type="CollisionShape3D" parent="InteractRange"]
shape = SubResource("SphereShape3D_702jv")
[node name="VisibilityArea" type="StaticBody3D" parent="." groups=["tree_visibility"]]
collision_layer = 2
collision_mask = 2
[node name="VisibilityShape" type="CollisionShape3D" parent="VisibilityArea"]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0.616604, 0)
shape = SubResource("CapsuleShape3D_702jv")
debug_color = Color(0.837648, 0.364145, 0.346694, 0.42)
[node name="LastBlocked" type="Timer" parent="."]
wait_time = 0.5