forked from funnymemellama/funnymemellama
No more flashlight on by default
Rebroke wishspd since it seems to work better "broken"
This commit is contained in:
parent
9b4f80b3d7
commit
4923f7437d
3 changed files with 5 additions and 4 deletions
|
@ -33,7 +33,7 @@ size = Vector3(1, 1.5, 1)
|
||||||
script = ExtResource("1_omu2m")
|
script = ExtResource("1_omu2m")
|
||||||
|
|
||||||
[node name="Koob" type="CSGMesh3D" parent="."]
|
[node name="Koob" type="CSGMesh3D" parent="."]
|
||||||
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 1.21614, 0)
|
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 1.08946, 0)
|
||||||
mesh = SubResource("BoxMesh_sbsxh")
|
mesh = SubResource("BoxMesh_sbsxh")
|
||||||
material = SubResource("StandardMaterial3D_8bjqg")
|
material = SubResource("StandardMaterial3D_8bjqg")
|
||||||
|
|
||||||
|
|
|
@ -81,7 +81,7 @@ func _physics_process(delta):
|
||||||
vel = _apply_friction(vel, delta)
|
vel = _apply_friction(vel, delta)
|
||||||
vel = _apply_accel(vel, wishdir, wishspeed, delta)
|
vel = _apply_accel(vel, wishdir, wishspeed, delta)
|
||||||
else:
|
else:
|
||||||
vel = _apply_air_accel(vel, wishvel, delta)
|
vel = _apply_air_accel(vel, wishvel, wishspeed, delta)
|
||||||
|
|
||||||
if not _noclip:
|
if not _noclip:
|
||||||
vel.y += g * delta
|
vel.y += g * delta
|
||||||
|
@ -125,7 +125,7 @@ func _apply_accel(vel: Vector3, wishdir: Vector3, wishspeed: float, delta: float
|
||||||
|
|
||||||
return vel + accelspeed * wishdir
|
return vel + accelspeed * wishdir
|
||||||
|
|
||||||
func _apply_air_accel(vel: Vector3, wishvel: Vector3, delta: float):
|
func _apply_air_accel(vel: Vector3, wishvel: Vector3, wishspeed: float, delta: float):
|
||||||
var wishveloc = wishvel.normalized()
|
var wishveloc = wishvel.normalized()
|
||||||
var wishspd = wishvel.length()
|
var wishspd = wishvel.length()
|
||||||
|
|
||||||
|
@ -137,7 +137,7 @@ func _apply_air_accel(vel: Vector3, wishvel: Vector3, delta: float):
|
||||||
if addspeed <= 0:
|
if addspeed <= 0:
|
||||||
return vel
|
return vel
|
||||||
|
|
||||||
var accelspeed = AIR_ACCEL * wishspd * delta
|
var accelspeed = AIR_ACCEL * wishspeed * delta
|
||||||
if accelspeed > addspeed:
|
if accelspeed > addspeed:
|
||||||
accelspeed = addspeed
|
accelspeed = addspeed
|
||||||
|
|
||||||
|
|
|
@ -27,6 +27,7 @@ radius = 0.1
|
||||||
|
|
||||||
[node name="Flashlight" type="SpotLight3D" parent="."]
|
[node name="Flashlight" type="SpotLight3D" parent="."]
|
||||||
transform = Transform3D(1, 0, 0, 0, 0.990246, 0.139329, 0, -0.139329, 0.990246, 0, 1.5, -0.4)
|
transform = Transform3D(1, 0, 0, 0, 0.990246, 0.139329, 0, -0.139329, 0.990246, 0, 1.5, -0.4)
|
||||||
|
visible = false
|
||||||
light_color = Color(1, 1, 0.768627, 1)
|
light_color = Color(1, 1, 0.768627, 1)
|
||||||
shadow_enabled = true
|
shadow_enabled = true
|
||||||
distance_fade_enabled = true
|
distance_fade_enabled = true
|
||||||
|
|
Loading…
Reference in a new issue