adjust height of player
This commit is contained in:
parent
59f7b7f863
commit
450b067b8d
7 changed files with 20 additions and 28 deletions
|
|
@ -133,8 +133,8 @@ func _physics_process(delta: float) -> void:
|
|||
jump_height = JUMP_HEIGHT_CROUCHED
|
||||
crouched = true
|
||||
elif Input.is_action_just_released(&"freeroam_crouch"):
|
||||
$CShape.shape.height = 1.8
|
||||
$Camera.position.y = 1.7
|
||||
$CShape.shape.height = 1.6
|
||||
$Camera.position.y = 1.5
|
||||
if (running):
|
||||
speed = SPEED_RUNNING
|
||||
jump_height = JUMP_HEIGHT_RUNNING
|
||||
|
|
|
|||
|
|
@ -11,18 +11,18 @@
|
|||
|
||||
[sub_resource type="CapsuleShape3D" id="CapsuleShape3D_ejydr"]
|
||||
radius = 0.3
|
||||
height = 1.8
|
||||
height = 1.6
|
||||
|
||||
[node name="Player" type="CharacterBody3D"]
|
||||
script = ExtResource("1_2f8j2")
|
||||
|
||||
[node name="CShape" type="CollisionShape3D" parent="."]
|
||||
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0.9, 0)
|
||||
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0.8, 0)
|
||||
shape = SubResource("CapsuleShape3D_ejydr")
|
||||
debug_color = Color(0.141176, 0.427451, 0.92549, 0.784314)
|
||||
|
||||
[node name="Camera" type="Camera3D" parent="."]
|
||||
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 1.7, 0)
|
||||
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 1.5, 0)
|
||||
fov = 80.0
|
||||
|
||||
[node name="Flashlight" type="SpotLight3D" parent="Camera"]
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue