FIXED BULLETHOLE GLITCH
This commit is contained in:
@@ -129,7 +129,7 @@ hit_from_inside = true
|
||||
collide_with_areas = true
|
||||
|
||||
[node name="ItemHolder" type="Node3D" parent="Head"]
|
||||
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, -0.47261, -2)
|
||||
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, -1.25, -0.85, -1.501)
|
||||
|
||||
[node name="pick_up_detection" type="Area3D" parent="."]
|
||||
collision_layer = 0
|
||||
|
||||
@@ -1275,6 +1275,26 @@ data = SubResource("VoxelGIData_dnr4q")
|
||||
transform = Transform3D(2, 0, 0, 0, 2, 0, 0, 0, 2, -16.6413, -0.228642, 25.8801)
|
||||
jump_amount = 30
|
||||
|
||||
[node name="JumpPlatform3" parent="." instance=ExtResource("8_f4nmn")]
|
||||
transform = Transform3D(2, 0, 0, 0, 2, 0, 0, 0, 2, -16.6413, 42.9056, 10.3178)
|
||||
jump_amount = 30
|
||||
|
||||
[node name="JumpPlatform4" parent="." instance=ExtResource("8_f4nmn")]
|
||||
transform = Transform3D(2, 0, 0, 0, 2, 0, 0, 0, 2, -16.6413, 74.6703, 26.7691)
|
||||
jump_amount = 30
|
||||
|
||||
[node name="JumpPlatform5" parent="." instance=ExtResource("8_f4nmn")]
|
||||
transform = Transform3D(2, 0, 0, 0, 2, 0, 0, 0, 2, -16.6413, 98.6654, 8.22681)
|
||||
jump_amount = 30
|
||||
|
||||
[node name="JumpPlatform6" parent="." instance=ExtResource("8_f4nmn")]
|
||||
transform = Transform3D(2, 0, 0, 0, 2, 0, 0, 0, 2, -16.6413, 128.396, 27.4015)
|
||||
jump_amount = 30
|
||||
|
||||
[node name="JumpPlatform7" parent="." instance=ExtResource("8_f4nmn")]
|
||||
transform = Transform3D(2, 0, 0, 0, 2, 0, 0, 0, 2, -16.6413, 190.44, -15.8505)
|
||||
jump_amount = 30
|
||||
|
||||
[node name="JumpPlatform2" parent="." instance=ExtResource("8_f4nmn")]
|
||||
transform = Transform3D(2, 0, 0, 0, 2, 0, 0, 0, 2, -57.3605, -0.228642, 15.9129)
|
||||
jump_amount = 30
|
||||
|
||||
@@ -57,7 +57,10 @@ func _process(delta):
|
||||
#bullethole effect
|
||||
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"):
|
||||
|
||||
@@ -27,12 +27,14 @@ func _ready():
|
||||
timer.start()
|
||||
|
||||
func _physics_process(delta):
|
||||
if player_follow != null and !pick_up:
|
||||
if player_follow != null:
|
||||
if !pick_up:
|
||||
despawning = false
|
||||
angular_velocity = lerp(angular_velocity, Vector3(0,0,0), 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(2).timeout
|
||||
await get_tree().create_timer(1).timeout
|
||||
position = lerp(position, player.camera.global_position, .01 * delta)
|
||||
await get_tree().create_timer(.01).timeout
|
||||
picked_up()
|
||||
|
||||
@@ -1,8 +1,10 @@
|
||||
extends CharacterBody3D
|
||||
|
||||
const MAX_AIR_DASH = 1
|
||||
|
||||
var speed
|
||||
var double_jump = true
|
||||
var air_dash = MAX_AIR_DASH
|
||||
var gravity = 9.8
|
||||
var is_climbing = false
|
||||
var ladder_center
|
||||
@@ -125,6 +127,7 @@ func _physics_process(delta):
|
||||
velocity.y -= gravity * delta
|
||||
else:
|
||||
double_jump = true
|
||||
air_dash = MAX_AIR_DASH
|
||||
|
||||
# Handle jump.
|
||||
if Input.is_action_just_pressed("jump") and is_on_floor() and !is_climbing:
|
||||
@@ -140,10 +143,11 @@ func _physics_process(delta):
|
||||
var direction = (self.transform.basis * Vector3(input_dir.x, 0, input_dir.y)).normalized()
|
||||
# Handle Sprint
|
||||
if Input.is_action_just_pressed("sprint") and !is_on_floor():
|
||||
if remaining_stamina >= DASH_STAM_REQ:
|
||||
if air_dash > 0:
|
||||
velocity.x += direction.x * DASH_SPEED
|
||||
velocity.z += direction.z * DASH_SPEED
|
||||
remaining_stamina -= 180
|
||||
air_dash -= 1
|
||||
print("AIR DASH " +str(air_dash))
|
||||
|
||||
if is_on_floor() and !is_climbing:
|
||||
if direction:
|
||||
|
||||
Reference in New Issue
Block a user