Inair move forgiveness, camera zoom, jump height

This commit is contained in:
Jakob Feldmann 2022-06-25 15:31:43 +02:00
parent bf5af96d20
commit c3255b30f2
4 changed files with 13 additions and 24 deletions

View File

@ -219,8 +219,8 @@ func calculate_fall_velocity(
)
else:
linear_velocity.y = max_velocity["fall"]
if is_equal_approx(velocity.x, 0):
# TODO this is weird
if (-4 < velocity.x and velocity.x < 4) :
# TODO This is poop
linear_velocity.x += inair_velocity * direction.x
if Input.is_action_just_pressed("jump"):
jump_buffer_filled = true
@ -247,7 +247,7 @@ func calculate_wallslide_velocity(
0, acceleration_force["walljump"].y * -1, mass, delta
)
# TODO this is done 3 times for different states
# TODO make air strafe a portionable boost instead of a one time acceleration
# TODO make air strafe a portionable boost instead of a one time acceleration (or not?! whaaat?)
elif is_correct_airstrafe_input():
linear_velocity.x = PhysicsFunc.two_step_euler(
linear_velocity.x,

View File

@ -40,7 +40,7 @@ shape = SubResource( 1 )
[node name="BlobbyCam" type="Camera2D" parent="."]
position = Vector2( 70, 0 )
current = true
zoom = Vector2( 0.666, 0.666 )
zoom = Vector2( 0.75, 0.75 )
limit_left = 0
limit_top = 0
limit_right = 0

View File

@ -20,10 +20,10 @@ var init_acceleration_force := {
# Oriented around deltas of 0.0166666...s
# newtonmeters is the unit
var acceleration_force := {
"walk": Vector2(2000, 56000),
"idle": Vector2(2000, 56000),
"run": Vector2(2800, 59000),
"walljump": Vector2(36000, 58000),
"walk": Vector2(2000, 74000),
"idle": Vector2(2000, 74000),
"run": Vector2(2800, 74000),
"walljump": Vector2(36000, 74000),
"air_strafe": Vector2(20000, 100)
}
# Gravity as m/s^2

File diff suppressed because one or more lines are too long