Fix hitboxes, add collision detection to maps

This commit is contained in:
2023-09-04 18:07:58 -07:00
parent 316651f409
commit 59a77d084c
14 changed files with 279 additions and 38 deletions

File diff suppressed because one or more lines are too long

View File

@@ -1,7 +1,10 @@
[gd_scene load_steps=27 format=3 uid="uid://bgkqfamdiwrrw"]
[gd_scene load_steps=26 format=3 uid="uid://bgkqfamdiwrrw"]
[ext_resource type="Script" path="res://Scripts/Character1.cs" id="1_ah2xl"]
[sub_resource type="BoxShape3D" id="BoxShape3D_te8tc"]
size = Vector3(0.51397, 1.62586, 1.17668)
[sub_resource type="StandardMaterial3D" id="StandardMaterial3D_4qqwi"]
resource_name = "Material.006"
cull_mode = 2
@@ -596,34 +599,29 @@ _surfaces = [{
blend_shape_mode = 0
shadow_mesh = SubResource("ArrayMesh_htkik")
[sub_resource type="BoxShape3D" id="BoxShape3D_udn4e"]
size = Vector3(0.822782, 0.527059, 0.80108)
[sub_resource type="BoxShape3D" id="BoxShape3D_lo3oj"]
size = Vector3(1.19222, 2.13872, 1.37879)
[node name="Megami" type="CharacterBody3D"]
[node name="Megami" type="CharacterBody3D" groups=["Player"]]
script = ExtResource("1_ah2xl")
[node name="CollisionShape3D" type="CollisionShape3D" parent="."]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0.726881, 0.14479)
shape = SubResource("BoxShape3D_te8tc")
[node name="Pivot" type="Node3D" parent="."]
[node name="megami" type="Node3D" parent="Pivot"]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0.0476897, 0, 0.00673294)
[node name="Plane" type="MeshInstance3D" parent="Pivot/megami"]
transform = Transform3D(0.00858108, 0.00109693, 0.00129912, 0, 0.00668392, -0.00564368, -0.00170029, 0.00553605, 0.00655646, -0.0019175, 1.25172, -0.0537346)
[node name="Plane" type="MeshInstance3D" parent="Pivot"]
transform = Transform3D(0.00858108, 0.00109693, 0.00129912, 0, 0.00668392, -0.00564368, -0.00170029, 0.00553605, 0.00655646, 0.0457722, 1.25172, -0.0470017)
mesh = SubResource("ArrayMesh_5aftx")
skeleton = NodePath("")
[node name="Area3D" type="Area3D" parent="Pivot/megami"]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, -1.75657e-15, 0, 0)
collision_layer = 16
[node name="Area3D" type="Area3D" parent="."]
collision_layer = 2
collision_mask = 4100
[node name="CollisionShape3D" type="CollisionShape3D" parent="Pivot/megami/Area3D"]
transform = Transform3D(0.999665, -0.0258978, -7.10543e-15, 0.0258978, 0.999665, 0, 0, 0, 1, 0, 0, 0)
shape = SubResource("BoxShape3D_udn4e")
[node name="CollisionShape3D" type="CollisionShape3D" parent="Area3D"]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0.726881, 0.14479)
shape = SubResource("BoxShape3D_te8tc")
[node name="CollisionShape3D" type="CollisionShape3D" parent="."]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0.468828, 0.149626)
shape = SubResource("BoxShape3D_lo3oj")
[connection signal="body_entered" from="Area3D" to="." method="OnHit"]

View File

@@ -1,7 +1,7 @@
[gd_scene load_steps=4 format=3 uid="uid://basequfmpg04f"]
[ext_resource type="PackedScene" uid="uid://dvhuxo7h0opvm" path="res://Levels/Final Levels/Stage2/stage_2Collisions.tscn" id="2_gsn0b"]
[ext_resource type="PackedScene" uid="uid://jgf7k1r35km1" path="res://Scenes/ExitPortal.tscn" id="2_sq8bv"]
[ext_resource type="PackedScene" uid="uid://cv33g1wyltecc" path="res://Levels/Final Levels/Stage2/STAGE 2.gltf" id="4_kiw1e"]
[sub_resource type="CylinderShape3D" id="CylinderShape3D_tux5n"]
radius = 0.957319
@@ -16,13 +16,17 @@ collision_layer = 0
collision_mask = 16
[node name="Exit Portal" parent="Area3D2" instance=ExtResource("2_sq8bv")]
transform = Transform3D(0.7, 0, 0, 0, 0.7, 0, 0, 0, 0.7, 0, 0, -2.53252)
transform = Transform3D(0.7, 0, 0, 0, 0.7, 0, 0, 0, 0.7, 2.14277, 0, -2.53252)
_levelIndex = 1
[node name="CollisionShape3D" type="CollisionShape3D" parent="Area3D2"]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, -2.51823)
shape = SubResource("CylinderShape3D_tux5n")
[node name="STAGE 2" parent="." instance=ExtResource("4_kiw1e")]
[node name="Collisions" type="Node3D" parent="."]
[node name="StaticBody3D" type="StaticBody3D" parent="Collisions"]
[node name="STAGE 2" parent="." instance=ExtResource("2_gsn0b")]
[connection signal="body_entered" from="Area3D2" to="." method="OnExitEntered"]

View File

@@ -11,17 +11,20 @@ script = ExtResource("1_gyfww")
[node name="god circuit stage 1" parent="." instance=ExtResource("1_w12q0")]
[node name="RigidBody3D" type="RigidBody3D" parent="god circuit stage 1"]
collision_layer = 4096
[node name="Area3D" type="Area3D" parent="god circuit stage 1"]
collision_layer = 0
collision_mask = 2
gravity_scale = 0.0
continuous_cd = true
max_contacts_reported = 1000
contact_monitor = true
can_sleep = false
[node name="CollisionShape3D" type="CollisionShape3D" parent="god circuit stage 1/RigidBody3D"]
[node name="CollisionShape3D" type="CollisionShape3D" parent="god circuit stage 1/Area3D"]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, -2.93109, 1.49955, -2.35288)
shape = SubResource("BoxShape3D_l1qm4")
[connection signal="body_entered" from="god circuit stage 1/RigidBody3D" to="." method="OnHit"]
[node name="StaticBody3D" type="StaticBody3D" parent="god circuit stage 1"]
collision_layer = 4096
collision_mask = 0
[node name="CollisionShape3D" type="CollisionShape3D" parent="god circuit stage 1/StaticBody3D"]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, -2.93109, 1.49955, -2.35288)
shape = SubResource("BoxShape3D_l1qm4")
[connection signal="body_entered" from="god circuit stage 1/Area3D" to="." method="OnHit"]