generated from krampus/template-godot4
Guard rail multimesh error fixes
This commit is contained in:
parent
9cc6036073
commit
d762bfc8f1
|
@ -20,7 +20,7 @@
|
|||
[ext_resource type="PackedScene" uid="uid://c7l58wuuahn7w" path="res://src/props/flag/flag.tscn" id="13_6jtao"]
|
||||
[ext_resource type="Texture2D" uid="uid://dj60e8ri2fco" path="res://assets/models/scenery/city/concrete_building_1/concrete_building_1.png" id="14_y7s2h"]
|
||||
[ext_resource type="Texture2D" uid="uid://du3vk5nnksohs" path="res://assets/sprites/particles/sparkle.png" id="16_2m5yu"]
|
||||
[ext_resource type="PackedScene" uid="uid://nqar1qcun8ax" path="res://src/props/scenery/highway/guard_rail.tscn" id="16_xtxyj"]
|
||||
[ext_resource type="PackedScene" uid="uid://nqar1qcun8ax" path="res://src/props/scenery/highway/guard_rail/guard_rail.tscn" id="16_xtxyj"]
|
||||
[ext_resource type="PackedScene" uid="uid://d0tcr6uijpym5" path="res://src/props/scenery/highway/highway_road.tscn" id="17_amems"]
|
||||
[ext_resource type="PackedScene" uid="uid://cblsayfgirexr" path="res://src/characters/umineko/umineko.tscn" id="21_ch6qk"]
|
||||
|
||||
|
|
|
@ -23,9 +23,21 @@ var _dirty := false
|
|||
|
||||
@onready var post_multi_mesh: MultiMeshInstance3D = $PostMultiMesh
|
||||
|
||||
static var multimesh_mesh: Mesh = preload(
|
||||
"res://src/props/scenery/highway/guard_rail/guard_rail_post_mesh.tres"
|
||||
)
|
||||
|
||||
|
||||
func _ready() -> void:
|
||||
post_multi_mesh.multimesh = post_multi_mesh.multimesh.duplicate()
|
||||
# Set up multimesh
|
||||
# This is a workaround for an engine bug as of Godot 4.3
|
||||
# ref: https://github.com/godotengine/godot/issues/68592
|
||||
var multimesh := MultiMesh.new()
|
||||
multimesh.transform_format = MultiMesh.TRANSFORM_3D
|
||||
multimesh.instance_count = 0
|
||||
multimesh.mesh = multimesh_mesh
|
||||
|
||||
post_multi_mesh.multimesh = multimesh
|
||||
|
||||
|
||||
func _update_multimesh() -> void:
|
|
@ -1,29 +1,12 @@
|
|||
[gd_scene load_steps=7 format=3 uid="uid://nqar1qcun8ax"]
|
||||
[gd_scene load_steps=5 format=3 uid="uid://nqar1qcun8ax"]
|
||||
|
||||
[ext_resource type="Script" path="res://src/props/scenery/highway/guard_rail.gd" id="1_imntf"]
|
||||
[ext_resource type="Script" path="res://src/props/scenery/highway/guard_rail/guard_rail.gd" id="1_imntf"]
|
||||
[ext_resource type="Material" uid="uid://cift6p0wn1oce" path="res://assets/materials/guard_rail.tres" id="2_1s4wy"]
|
||||
[ext_resource type="PlaneMesh" uid="uid://bdcmgvgpj1e0w" path="res://src/props/scenery/highway/guard_rail/guard_rail_post_mesh.tres" id="3_hha2c"]
|
||||
|
||||
[sub_resource type="CompressedTexture2D" id="CompressedTexture2D_fo7j3"]
|
||||
load_path = "res://.godot/imported/guard_rail_post.png-4447ff881a5916e5281ed251b7beecd0.ctex"
|
||||
|
||||
[sub_resource type="StandardMaterial3D" id="StandardMaterial3D_k1yjg"]
|
||||
transparency = 2
|
||||
alpha_scissor_threshold = 0.5
|
||||
alpha_antialiasing_mode = 0
|
||||
albedo_texture = SubResource("CompressedTexture2D_fo7j3")
|
||||
texture_filter = 4
|
||||
texture_repeat = false
|
||||
billboard_mode = 2
|
||||
|
||||
[sub_resource type="PlaneMesh" id="PlaneMesh_ko4yv"]
|
||||
material = SubResource("StandardMaterial3D_k1yjg")
|
||||
size = Vector2(0.5, 1)
|
||||
center_offset = Vector3(0, 0.5, 0)
|
||||
orientation = 2
|
||||
|
||||
[sub_resource type="MultiMesh" id="MultiMesh_ecm13"]
|
||||
[sub_resource type="MultiMesh" id="MultiMesh_suiix"]
|
||||
transform_format = 1
|
||||
mesh = SubResource("PlaneMesh_ko4yv")
|
||||
mesh = ExtResource("3_hha2c")
|
||||
|
||||
[node name="GuardRail" type="Path3D"]
|
||||
script = ExtResource("1_imntf")
|
||||
|
@ -59,6 +42,6 @@ path_joined = false
|
|||
material = ExtResource("2_1s4wy")
|
||||
|
||||
[node name="PostMultiMesh" type="MultiMeshInstance3D" parent="."]
|
||||
multimesh = SubResource("MultiMesh_ecm13")
|
||||
multimesh = SubResource("MultiMesh_suiix")
|
||||
|
||||
[connection signal="curve_changed" from="." to="." method="_on_curve_changed"]
|
|
@ -0,0 +1,19 @@
|
|||
[gd_resource type="PlaneMesh" load_steps=3 format=3 uid="uid://bdcmgvgpj1e0w"]
|
||||
|
||||
[sub_resource type="CompressedTexture2D" id="CompressedTexture2D_fo7j3"]
|
||||
load_path = "res://.godot/imported/guard_rail_post.png-4447ff881a5916e5281ed251b7beecd0.ctex"
|
||||
|
||||
[sub_resource type="StandardMaterial3D" id="StandardMaterial3D_k1yjg"]
|
||||
transparency = 2
|
||||
alpha_scissor_threshold = 0.5
|
||||
alpha_antialiasing_mode = 0
|
||||
albedo_texture = SubResource("CompressedTexture2D_fo7j3")
|
||||
texture_filter = 4
|
||||
texture_repeat = false
|
||||
billboard_mode = 2
|
||||
|
||||
[resource]
|
||||
material = SubResource("StandardMaterial3D_k1yjg")
|
||||
size = Vector2(0.5, 1)
|
||||
center_offset = Vector3(0, 0.5, 0)
|
||||
orientation = 2
|
Loading…
Reference in New Issue