fixed camera lock bug and item steps are mostly working
This commit is contained in:
@@ -75,8 +75,3 @@ attenuation_model = 1
|
||||
autoplay = true
|
||||
|
||||
[node name="Timer" type="Timer" parent="."]
|
||||
|
||||
[node name="PickupTimer" type="Timer" parent="."]
|
||||
wait_time = 3.0
|
||||
|
||||
[connection signal="timeout" from="PickupTimer" to="." method="_on_pickup_timer_timeout"]
|
||||
|
||||
@@ -125,6 +125,3 @@ collision_mask = 16
|
||||
shape = SubResource("CapsuleShape3D_ms2qn")
|
||||
|
||||
[node name="Timer" type="Timer" parent="."]
|
||||
|
||||
[node name="PickupTimer" type="Timer" parent="."]
|
||||
wait_time = 3.0
|
||||
|
||||
@@ -78,10 +78,6 @@ shape = SubResource("CapsuleShape3D_om0ey")
|
||||
|
||||
[node name="Timer" type="Timer" parent="."]
|
||||
|
||||
[node name="PickupTimer" type="Timer" parent="."]
|
||||
wait_time = 3.0
|
||||
one_shot = true
|
||||
|
||||
[connection signal="body_entered" from="." to="." method="_on_body_entered"]
|
||||
[connection signal="area_entered" from="Area3D" to="." method="_on_area_3d_area_entered"]
|
||||
[connection signal="body_entered" from="Area3D" to="." method="_on_area_3d_body_entered"]
|
||||
|
||||
@@ -32,13 +32,10 @@ func _physics_process(delta):
|
||||
position = lerp(position, player.item_holder.global_position, 25 * delta)
|
||||
|
||||
if abs(position - player.item_holder.global_position) < Vector3(.5,.5,.5):
|
||||
await get_tree().create_timer(3).timeout
|
||||
pick_up = true
|
||||
|
||||
if pick_up:
|
||||
position = lerp(position, player.camera.global_position, 5 * delta)
|
||||
if abs(global_position - player.camera.global_position) < Vector3(.5,.5,.5):
|
||||
pickupable = true
|
||||
await get_tree().create_timer(2).timeout
|
||||
position = lerp(position, player.camera.global_position, .01 * delta)
|
||||
await get_tree().create_timer(.01).timeout
|
||||
picked_up()
|
||||
|
||||
|
||||
func picked_up():
|
||||
|
||||
@@ -109,14 +109,13 @@ func _ready():
|
||||
if AUDIO == false:
|
||||
AudioServer.set_bus_volume_db(0,-80)
|
||||
|
||||
func _unhandled_input(event) -> void:
|
||||
func _input(event) -> void:
|
||||
if event is InputEventMouseMotion:
|
||||
self.rotate_y(-event.relative.x * SENSITIVITY)
|
||||
head.rotate_x(-event.relative.y * SENSITIVITY)
|
||||
head.rotation.x = clamp(head.rotation.x, deg_to_rad(-90), deg_to_rad(85))
|
||||
mouse_input = event.relative
|
||||
|
||||
|
||||
func _physics_process(delta):
|
||||
|
||||
if !dead:
|
||||
@@ -306,7 +305,7 @@ func ladder_collide(is_climbing):
|
||||
func _on_pick_up_magnet_body_entered(body):
|
||||
if body.is_in_group("pickup") and body.is_in_group("magnet"):
|
||||
body.player_follow = self
|
||||
#body.collision_shape.disabled = true
|
||||
body.collision_shape.disabled = true
|
||||
|
||||
func weapon_tilt(input_x, delta):
|
||||
if weapon_holder:
|
||||
|
||||
Reference in New Issue
Block a user