Fixed doors by unlocking angular axis (x and z), renamed Door.gd to HingeInteractable.gd
This commit is contained in:
+1
-3
@@ -1,6 +1,6 @@
|
||||
[gd_scene format=3 uid="uid://hmpweoahtner"]
|
||||
|
||||
[ext_resource type="Script" uid="uid://cyw8ng7alo12e" path="res://Scripts/Door.gd" id="1_1vvux"]
|
||||
[ext_resource type="Script" uid="uid://cyw8ng7alo12e" path="res://Scripts/HingeInteractable.gd" id="1_1vvux"]
|
||||
|
||||
[sub_resource type="BoxMesh" id="BoxMesh_va8t4"]
|
||||
size = Vector3(0.2, 3, 0.2)
|
||||
@@ -57,8 +57,6 @@ transform = Transform3D(-4.371139e-08, -0.635, 0, 1, -2.7756732e-08, 0, 0, 0, 1,
|
||||
shape = SubResource("BoxShape3D_476pq")
|
||||
|
||||
[node name="DoorBody" type="RigidBody3D" parent="." unique_id=1982348670]
|
||||
axis_lock_angular_x = true
|
||||
axis_lock_angular_z = true
|
||||
mass = 10.0
|
||||
angular_damp = 5.0
|
||||
|
||||
|
||||
+1
-1
@@ -47,7 +47,7 @@ snapAngleThreshold = 0.5
|
||||
snapVelocityThreshold = 5.0
|
||||
|
||||
[node name="MedievalDoor" parent="." unique_id=1143822269 instance=ExtResource("3_jw32o")]
|
||||
transform = Transform3D(1.5, 0, 0, 0, 1.5, 0, 0, 0, 1.5, 7.1977696, -0.02157104, -1.6521502)
|
||||
transform = Transform3D(0.9396926, 0, 0.34202012, 0, 1, 0, -0.34202012, 0, 0.9396926, 7.1977696, -0.02157104, -1.6521502)
|
||||
|
||||
[node name="Block" type="Node3D" parent="." unique_id=1216126902]
|
||||
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, -8.362265, 2.041253, 0)
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
[ext_resource type="Texture2D" uid="uid://dulhjsunch31g" path="res://Textures/Door/Wood.jpg" id="1_fgasx"]
|
||||
[ext_resource type="Texture2D" uid="uid://dp4cgjr828p7j" path="res://Textures/Door/Stone.jpg" id="2_fpqxj"]
|
||||
[ext_resource type="Texture2D" uid="uid://jydmkkryke23" path="res://Textures/Door/Door.jpg" id="4_8du8j"]
|
||||
[ext_resource type="Script" uid="uid://cyw8ng7alo12e" path="res://Scripts/Door.gd" id="5_3u0t0"]
|
||||
[ext_resource type="Script" uid="uid://cyw8ng7alo12e" path="res://Scripts/HingeInteractable.gd" id="5_3u0t0"]
|
||||
[ext_resource type="Texture2D" uid="uid://cq1svjaaumlba" path="res://Textures/Door/RustedMetal.jpg" id="5_pao41"]
|
||||
|
||||
[sub_resource type="StandardMaterial3D" id="StandardMaterial3D_5ubf6"]
|
||||
@@ -273,8 +273,6 @@ metadata/_custom_type_script = "uid://cyw8ng7alo12e"
|
||||
[node name="DoorBody" type="RigidBody3D" parent="DoorLeft" unique_id=1047666100]
|
||||
collision_layer = 4
|
||||
collision_mask = 9
|
||||
axis_lock_angular_x = true
|
||||
axis_lock_angular_z = true
|
||||
mass = 10.0
|
||||
angular_damp = 5.0
|
||||
|
||||
@@ -303,8 +301,6 @@ metadata/_custom_type_script = "uid://cyw8ng7alo12e"
|
||||
[node name="DoorBody" type="RigidBody3D" parent="DoorRight" unique_id=1795020957]
|
||||
collision_layer = 4
|
||||
collision_mask = 9
|
||||
axis_lock_angular_x = true
|
||||
axis_lock_angular_z = true
|
||||
mass = 10.0
|
||||
angular_damp = 5.0
|
||||
|
||||
|
||||
Reference in New Issue
Block a user