minor bug fix

This commit is contained in:
derek
2024-10-14 16:39:37 -05:00
parent 784a9865ab
commit c2b96e3ea6
5 changed files with 8 additions and 5 deletions

View File

@@ -638,7 +638,7 @@ gun_1 = ExtResource("2_fn4vb")
health_drop_enabled = false
[node name="Player" parent="." instance=ExtResource("9_3usor")]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 39.6989, 19.155, 65.5954)
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, -0.137423, 1.78365, 12.8627)
[node name="WorldEnvironment" type="WorldEnvironment" parent="."]
environment = SubResource("Environment_b2qms")

Binary file not shown.

Binary file not shown.

View File

@@ -51,7 +51,7 @@ albedo_color = Color(0.906332, 0.906332, 0.906332, 1)
roughness = 0.5
emission_enabled = true
emission = Color(1, 1, 1, 1)
emission_energy_multiplier = 20.0
emission_energy_multiplier = 30.0
[sub_resource type="ArrayMesh" id="ArrayMesh_qx61k"]
_surfaces = [{
@@ -286,7 +286,7 @@ gun_2 = ExtResource("3_i5y5k")
environment = SubResource("Environment_ro14g")
[node name="Player" parent="." instance=ExtResource("6_m8xxf")]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0.281984, 29.258, 35.8194)
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0.281984, 218.696, 26.9567)
AUDIO = false
[node name="LightmapGI" type="LightmapGI" parent="."]
@@ -338,6 +338,7 @@ door = NodePath("Door")
[node name="Door" type="MeshInstance3D" parent="Door1" node_paths=PackedStringArray("anim_player")]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 4.27403, -20.1043)
gi_mode = 2
mesh = SubResource("BoxMesh_6no40")
script = ExtResource("10_08mbs")
anim_player = NodePath("AnimationPlayer")
@@ -369,7 +370,6 @@ shape = SubResource("SphereShape3D_vyys8")
transform = Transform3D(1.655, 0, 0, 0, 1.655, 0, 0, 0, 1.655, 11.2957, 1.00545, -14.2426)
skeleton = NodePath("../..")
script = ExtResource("12_yaq57")
toggle_enabled = true
timer_duration = 1.0
[node name="StaticBody3D" type="StaticBody3D" parent="Door1/switch2" groups=["interact", "switch"]]

View File

@@ -61,7 +61,10 @@ func _process(delta):
var instance_bullethole = bullethole.instantiate()
ray.get_collider().add_child(instance_bullethole)
instance_bullethole.global_transform.origin = ray.get_collision_point()
instance_bullethole.look_at(ray.get_collision_point() + ray.get_collision_normal(), Vector3.UP)
if (abs(ray.get_collision_normal().y) > 0.99):
instance_bullethole.look_at(ray.get_collision_point() + ray.get_collision_normal(), Vector3(0,0,1))
else:
instance_bullethole.look_at(ray.get_collision_point() + ray.get_collision_normal())
#move rigidbodies
if ray.get_collider().is_in_group("scene_rigidbody"):