wall running tweaks
This commit is contained in:
@@ -197,6 +197,24 @@ use_collision = true
|
||||
size = Vector3(9.97656, 21.4505, 9.16638)
|
||||
material = ExtResource("7_l3crk")
|
||||
|
||||
[node name="CSGBox3D34" type="CSGBox3D" parent="NavigationRegion3D"]
|
||||
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, -3.07182, 9.43937, -12.2423)
|
||||
use_collision = true
|
||||
size = Vector3(9.97656, 21.4505, 9.16638)
|
||||
material = ExtResource("7_l3crk")
|
||||
|
||||
[node name="CSGBox3D35" type="CSGBox3D" parent="NavigationRegion3D"]
|
||||
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, -0.600389, 11.8059, -10.6879)
|
||||
use_collision = true
|
||||
size = Vector3(61.0098, 8.70052, 1.6647)
|
||||
material = ExtResource("7_l3crk")
|
||||
|
||||
[node name="CSGBox3D36" type="CSGBox3D" parent="NavigationRegion3D"]
|
||||
transform = Transform3D(0.914452, 0, -0.404695, 0, 1, 0, 0.404695, 0, 0.914452, -16.2148, 7.74282, 27.2205)
|
||||
use_collision = true
|
||||
size = Vector3(61.0098, 8.70052, 1.6647)
|
||||
material = ExtResource("7_l3crk")
|
||||
|
||||
[node name="CSGBox3D23" type="CSGBox3D" parent="NavigationRegion3D"]
|
||||
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 5.69811, 9.43937, 33.5882)
|
||||
use_collision = true
|
||||
|
||||
@@ -306,10 +306,10 @@ func _physics_process(delta):
|
||||
else:
|
||||
velocity.x = lerp(velocity.x, direction.x * speed, delta * 6.5)
|
||||
velocity.z = lerp(velocity.z, direction.z * speed, delta * 6.5)
|
||||
## wall_run
|
||||
## Wall Running
|
||||
if wall_ray_1.is_colliding() or wall_ray_2.is_colliding():
|
||||
if abs(Vector2(velocity.x,velocity.y)) >= Vector2(5.0,5.0):
|
||||
velocity.y = clamp(velocity.y,-2,abs(velocity.y))
|
||||
velocity.y = clamp(velocity.y,-1,abs(velocity.y))
|
||||
#velocity.x += -velocity.x * .01 * delta
|
||||
#velocity.z += -velocity.z * .01 * delta
|
||||
|
||||
|
||||
Reference in New Issue
Block a user